[FFmpeg-devel] [PATCH] oggenc: Write stream metadata if available

James Almer jamrial at gmail.com
Thu Jul 18 18:57:01 CEST 2013


On 18/07/13 7:59 AM, Paul B Mahol wrote:
> On 7/18/13, James Almer <jamrial at gmail.com> wrote:
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>  libavformat/oggenc.c | 10 ++++++----
>>  1 file changed, 6 insertions(+), 4 deletions(-)
>>
>> diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
>> index 1255364..a0bc1cf 100644
>> --- a/libavformat/oggenc.c
>> +++ b/libavformat/oggenc.c
>> @@ -447,11 +447,13 @@ static int ogg_write_header(AVFormatContext *s)
>>              } while (j < i);
>>          oggstream->serial_num = serial_num;
>>
>> +        av_dict_copy(&st->metadata, s->metadata, 0);
>> +
> 
> Why?

Because global metadata would be discarded otherwise.
Fields created by lavf like "encoder", or any global field the source file might 
have, for example.


More information about the ffmpeg-devel mailing list