[FFmpeg-devel] [PATCH ]FLV Metadata

Anton Khirnov anton
Fri Sep 3 16:33:02 CEST 2010


> diff -Naur ffmpeg-9999.old/libavformat/flvenc.c ffmpeg-9999/libavformat/flvenc.c
> --- ffmpeg-9999.old/libavformat/flvenc.c	2010-08-07 10:21:58.000000000 -0300
> +++ ffmpeg-9999/libavformat/flvenc.c	2010-09-02 17:19:21.000000000 -0300
> @@ -22,6 +22,7 @@
>  #include "flv.h"
>  #include "internal.h"
>  #include "avc.h"
> +#include "metadata.h"
>  
>  #undef NDEBUG
>  #include <assert.h>
> @@ -257,6 +258,12 @@
>          put_amf_double(pb, audio_enc->codec_tag);
>      }
>  
> +    while ((tag = av_metadata_get(m, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
> +        put_amf_string(pb, tag.key);
> +        put_byte(pb, AMF_DATA_TYPE_STRING);
> +        put_amf_string(pb, tag.value);
> +    }
> +
>      put_amf_string(pb, "filesize");
>      flv->filesize_offset= url_ftell(pb);
>      put_amf_double(pb, 0); // delayed write

This doesn't build -- 'tag' and 'm' are not declared, besides
av_metadata_get returns a pointer, so tag.key and tag.value are wrong.
Why did you change all this? It was correct in your last patch.

Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100903/1d0f048f/attachment.pgp>



More information about the ffmpeg-devel mailing list