lavc/h264_slice: properly forward positive "error" code
authorClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 14:13:36 +0000 (16:13 +0200)
committerClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 14:16:26 +0000 (16:16 +0200)
Fixes ./ffmpeg -skip_frame nokey -i h264/h264_intra_first-small.ts

Regression since c54e2740e1f4a8fb7fa4e521755bf4158c4cda51

libavcodec/h264_slice.c

index 522a36c..0c36c8f 100644 (file)
@@ -1702,7 +1702,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
     int i, j, ret = 0;
 
     ret = h264_slice_header_parse(h, sl);
-    if (ret < 0)
+    if (ret) // can not be ret<0 because of SLICE_SKIPED, SLICE_SINGLETHREAD, ...
         return ret;
 
     if (sl->slice_type_nos == AV_PICTURE_TYPE_B && !sl->direct_spatial_mv_pred)