[FFmpeg-devel] [PATCH 1/2] ffplay: check return code of avcodec_decode_video2()

Michael Niedermayer michaelni at gmx.at
Sat Jun 9 20:05:48 CEST 2012


On Sat, Jun 09, 2012 at 07:55:43PM +0200, Marton Balint wrote:
> 
> 
> On Sat, 9 Jun 2012, Michael Niedermayer wrote:
> 
> >On Sat, Jun 09, 2012 at 06:44:52PM +0200, Marton Balint wrote:
> >>On Fri, 8 Jun 2012, Michael Niedermayer wrote:
> >>
> >>>Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> >>>---
> >>>ffplay.c |    3 ++-
> >>>1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>>diff --git a/ffplay.c b/ffplay.c
> >>>index cb62614..01a010e 100644
> >>>--- a/ffplay.c
> >>>+++ b/ffplay.c
> >>>@@ -1504,7 +1504,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
> >>>       return 0;
> >>>   }
> >>>
> >>>-    avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt);
> >>>+    if(avcodec_decode_video2(is->video_st->codec, frame, &got_picture, pkt) < 0)
> >>>+        return -1;
> >>
> >>On second thought, that should be return 0 instead, -1 will stop the
> >>whole decoding process.
> >
> >yes :(
> >should i post a patch?
> 
> No need, I pushed the fix to my tree, please merge.

merged

thanks

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

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120609/436c3389/attachment.asc>


More information about the ffmpeg-devel mailing list