[FFmpeg-devel] [PATCH] fix for roundup issue 2470

Daniel Kang daniel.d.kang
Sun Jan 2 04:47:20 CET 2011


On Sat, Jan 1, 2011 at 10:35 PM, Michael Niedermayer <michaelni at gmx.at>wrote:

>  >  yuv4mpeg.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > efbb5d53747ae2bc4cb53bc787dcb409233aeb07  y4m_invalid_header_fix.diff
> > From 728512463c62fffb09bfe5e45bf2b5793c38b61e Mon Sep 17 00:00:00 2001
> > From: Daniel Kang <daniel.d.kang at gmail.com>
> > Date: Fri, 31 Dec 2010 23:19:32 -0500
> > Subject: [PATCH] fix ffmpeg crash for invalid y4m headers
> >
> > ---
> >  libavformat/yuv4mpeg.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
> > index 99a1ce2..5e895ca 100644
> > --- a/libavformat/yuv4mpeg.c
> > +++ b/libavformat/yuv4mpeg.c
> > @@ -316,7 +316,7 @@ static int yuv4_read_header(AVFormatContext *s,
> AVFormatParameters *ap)
> >              pix_fmt = alt_pix_fmt;
> >      }
> >
> > -    if (raten == 0 && rated == 0) {
> > +    if (raten == 0 || rated == 0) {
>
> should be <=
>

You are right, I have updated the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: y4m_invalid_header_fix.diff
Type: application/octet-stream
Size: 743 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110101/a535734f/attachment.obj>



More information about the ffmpeg-devel mailing list