[FFmpeg-cvslog] swfdec: do not set codec timebase.

Anton Khirnov git at videolan.org
Thu Mar 1 03:20:18 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Feb 29 08:07:57 2012 +0100| [eaea76d72ce56f0c9ae4b15dbb6629ef1b027de7] | committer: Anton Khirnov

swfdec: do not set codec timebase.

It is not supposed to be set outside of lavc.

Fixes a divide by zero when the stored framerate is 0.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eaea76d72ce56f0c9ae4b15dbb6629ef1b027de7
---

 libavformat/swfdec.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index c194310..71346de 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -113,7 +113,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
             vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, avio_r8(pb));
             avpriv_set_pts_info(vst, 16, 256, swf->frame_rate);
-            vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
             len -= 8;
         } else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
             /* streaming found */
@@ -186,7 +185,6 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
                 vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                 vst->codec->codec_id = CODEC_ID_MJPEG;
                 avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
-                vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
                 st = vst;
             }
             avio_rl16(pb); /* BITMAP_ID */



More information about the ffmpeg-cvslog mailing list