[FFmpeg-devel] [PATCH] lavf/adtsenc: Add support for APE tags
Paul B Mahol
onemda at gmail.com
Thu Jul 11 22:16:58 CEST 2013
On 7/11/13, Thierry Foucu <tfoucu at gmail.com> wrote:
> On Thu, Jul 11, 2013 at 11:08 AM, James Almer <jamrial at gmail.com> wrote:
>
>> Should fix ticket #2269
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>> libavformat/adtsenc.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
>> index 60d7b07..7118105 100644
>> --- a/libavformat/adtsenc.c
>> +++ b/libavformat/adtsenc.c
>> @@ -25,6 +25,7 @@
>> #include "libavcodec/avcodec.h"
>> #include "libavcodec/mpeg4audio.h"
>> #include "avformat.h"
>> +#include "apetag.h"
>>
>> #define ADTS_HEADER_SIZE 7
>>
>> @@ -162,6 +163,13 @@ static int adts_write_packet(AVFormatContext *s,
>> AVPacket *pkt)
>> return 0;
>> }
>>
>> +static int adts_write_trailer(AVFormatContext *s)
>> +{
>> + ff_ape_write_tag(s);
>>
>
> I think this should be an option of the adts muxer as not all the adts
> decoder will know what to do with this and some will crash.
> and if some people use libav as a library and want to create adts chunk
> (HLS) they may be calling trailer at the end of each chunk and this will be
> adding the ape metadata.
>
> What do you all think?
You sure this code is used for HLS?
>
>
>> +
>> + return 0;
>> +}
>> +
>> AVOutputFormat ff_adts_muxer = {
>> .name = "adts",
>> .long_name = NULL_IF_CONFIG_SMALL("ADTS AAC (Advanced Audio
>> Coding)"),
>> @@ -172,4 +180,5 @@ AVOutputFormat ff_adts_muxer = {
>> .video_codec = AV_CODEC_ID_NONE,
>> .write_header = adts_write_header,
>> .write_packet = adts_write_packet,
>> + .write_trailer = adts_write_trailer,
>> };
>> --
>> 1.8.1.5
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list