[FFmpeg-devel] [PATCH] Don't let ctx->skip_frame>0produceerrors

Michael Niedermayer michaelni
Thu Aug 30 18:28:31 CEST 2007


Hi

On Thu, Aug 30, 2007 at 05:38:00PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> On 2007-08-30 13:45, Michael Niedermayer wrote:
> > > Index: libavcodec/h264.c
> > > ===================================================================
> > > --- libavcodec/h264.c    (Revision 10260)
> > > +++ libavcodec/h264.c    (Arbeitskopie)
> > > @@ -7968,6 +7968,7 @@
> > >          return -1;
> > >  
> > >      if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){
> > > + if (avctx->skip_frame>0) return 0;
> > > av_log(avctx, AV_LOG_ERROR, "no frame!\n");
> > > return -1;
> > > }
> > 
> > well but what if
> > avctx->skip_frame>0
> > and this code is reached for a reason different then skip_frame ?
> 
> Then the user silenced an error by disabling complete decoding.
> Or is there a better solution? More different return values for
> decode_nal_units() only make the code messier, don't you think?

also 
 if(  (s->hurry_up == 1 && h->nal_ref_idc  == 0) //FIXME do not discard SEI id
           ||(avctx->skip_frame >= AVDISCARD_NONREF && h->nal_ref_idc  == 0))
            continue;

your code hides the warning only in one of the 2 cases



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

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070830/fb97edcb/attachment.pgp>



More information about the ffmpeg-devel mailing list