[FFmpeg-devel] [PATCH] oggdec: do not set time_base to invalid value
Reimar Döffinger
Reimar.Doeffinger
Thu Jan 20 23:18:39 CET 2011
Ping?
On 11 Dec 2010, at 18:00, Reimar D?ffinger <Reimar.Doeffinger at gmx.de> wrote:
> Hello,
> possible we should consider catching this at a higher level, and possibly
> st->codec->sample_rate should not be assigned an invalid value either...
> Vorbis ogg parser may set st->time_base.den to 0, causing an
> assertion failure in av_rescale_* during av_update_stream_timings.
> Below patch is one way to fix.
> Original bug report against MPlayer with sample files: http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1189
> Index: ffmpeg/libavformat/oggparsevorbis.c
> ===================================================================
> --- ffmpeg/libavformat/oggparsevorbis.c (revision 25928)
> +++ ffmpeg/libavformat/oggparsevorbis.c (working copy)
> @@ -250,6 +260,7 @@
> st->codec->codec_id = CODEC_ID_VORBIS;
>
> st->time_base.num = 1;
> + if (st->codec->sample_rate > 0)
> st->time_base.den = st->codec->sample_rate;
> } else if (os->buf[os->pstart] == 3) {
> if (os->psize > 8)
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list