On Wed, 15 Feb 2012 10:16:41 -0800, "Ronald S. Bultje" <[email protected]> 
wrote:
> From: "Ronald S. Bultje" <[email protected]>
> 
> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> CC: [email protected]
> ---
>  libavformat/swfdec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
> index 1bcb249..ce59ece 100644
> --- a/libavformat/swfdec.c
> +++ b/libavformat/swfdec.c
> @@ -113,7 +113,7 @@ 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 };
> +            vst->codec->time_base = vst->time_base;
>              len -= 8;
>          } else if (tag == TAG_STREAMHEAD || tag == TAG_STREAMHEAD2) {
>              /* streaming found */
> -- 
> 1.7.7.4
> 

Wouldn't it be better to fail if framerate is 0?

Or at least warn that the timestamps will be invalid.

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to