[FFmpeg-cvslog] r16943 - trunk/libavformat/flvdec.c
benoit
subversion
Mon Feb 2 17:05:50 CET 2009
Author: benoit
Date: Mon Feb 2 17:05:50 2009
New Revision: 16943
Log:
Implement the reading of the video bitrate of flv movies out of the meta data,
to have the total bitrate available in the avformat structures.
Patch by Stefan de Konink stefan konink de
Modified:
trunk/libavformat/flvdec.c
Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c Mon Feb 2 11:58:33 2009 (r16942)
+++ trunk/libavformat/flvdec.c Mon Feb 2 17:05:50 2009 (r16943)
@@ -187,6 +187,8 @@ static int amf_parse_object(AVFormatCont
if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE;
// else if(!strcmp(key, "width") && vcodec && num_val > 0) vcodec->width = num_val;
// else if(!strcmp(key, "height") && vcodec && num_val > 0) vcodec->height = num_val;
+ else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)(num_val * 1024.0))
+ vcodec->bit_rate = num_val * 1024.0;
else if(!strcmp(key, "audiocodecid") && acodec && 0 <= (int)num_val)
flv_set_audio_codec(s, astream, (int)num_val << FLV_AUDIO_CODECID_OFFSET);
else if(!strcmp(key, "videocodecid") && vcodec && 0 <= (int)num_val)
More information about the ffmpeg-cvslog
mailing list