[FFmpeg-devel] [PATCH] Don't let ctx->skip_frame>0 produce errors
Michael Niedermayer
michaelni
Thu Aug 30 15:45:28 CEST 2007
Hi
On Thu, Aug 30, 2007 at 01:30:15PM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> If user sets ctx->skip_frame to a value >0 (for example with MPlayers
> lavdopts skipframe=nonref), libavcodec shows an error for every skipped
> frame and returns -1.
>
> IMO, if the user explicitly asked for skipping frames, this should not
> be reported as an error. Attached patch makes libavcodec return 0 if a
> frame is skipped.
>
> Carl Eugen
> 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 ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- 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/66321d63/attachment.pgp>
More information about the ffmpeg-devel
mailing list