[FFmpeg-cvslog] r25101 - trunk/libavformat/flvenc.c
cehoyos
subversion
Sat Sep 11 01:29:07 CEST 2010
Author: cehoyos
Date: Sat Sep 11 01:29:07 2010
New Revision: 25101
Log:
FLV Metadata
Patch by Tom?s Touceda, chiiph gentoo org
Modified:
trunk/libavformat/flvenc.c
Modified: trunk/libavformat/flvenc.c
==============================================================================
--- trunk/libavformat/flvenc.c Fri Sep 10 21:51:08 2010 (r25100)
+++ trunk/libavformat/flvenc.c Sat Sep 11 01:29:07 2010 (r25101)
@@ -22,6 +22,7 @@
#include "flv.h"
#include "internal.h"
#include "avc.h"
+#include "metadata.h"
#undef NDEBUG
#include <assert.h>
@@ -176,6 +177,7 @@ static int flv_write_header(AVFormatCont
int i;
double framerate = 0.0;
int metadata_size_pos, data_size;
+ AVMetadataTag *tag = NULL;
for(i=0; i<s->nb_streams; i++){
AVCodecContext *enc = s->streams[i]->codec;
@@ -272,6 +274,12 @@ static int flv_write_header(AVFormatCont
put_amf_double(pb, audio_enc->codec_tag);
}
+ while ((tag = av_metadata_get(s->metadata, "", 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
More information about the ffmpeg-cvslog
mailing list