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

Michael Niedermayer michaelni
Sun Jan 2 05:05:16 CET 2011


On Sat, Jan 01, 2011 at 10:47:20PM -0500, Daniel Kang wrote:
> 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.

>  yuv4mpeg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> dd727343234bb0468ab7b1bd8d02ac557aa3455b  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

looks good if tested

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110102/66f40b86/attachment.pgp>



More information about the ffmpeg-devel mailing list