[FFmpeg-cvslog] avcodec/h264: Use named identifier for single thread fall-back return from ff_h264_decode_slice_header ()

Michael Niedermayer git at videolan.org
Thu Jun 19 20:26:27 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 19 19:49:26 2014 +0200| [5bf5e6b1c0fd1aa8f27242b603592ec28ed44cf5] | committer: Michael Niedermayer

avcodec/h264: Use named identifier for single thread fall-back return from ff_h264_decode_slice_header()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5bf5e6b1c0fd1aa8f27242b603592ec28ed44cf5
---

 libavcodec/h264.c       |    2 +-
 libavcodec/h264.h       |    1 +
 libavcodec/h264_slice.c |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index a266718..2348d53 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1727,7 +1727,7 @@ again:
                 if (err < 0)
                     av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
                 h->ref_count[0] = h->ref_count[1] = h->list_count = 0;
-            } else if (err == 1) {
+            } else if (err == SLICE_SINGLETHREAD) {
                 /* Slice could not be decoded in parallel mode, copy down
                  * NAL unit stuff to context 0 and restart. Note that
                  * rbsp_buffer is not transferred, but since we no longer
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index da74241..943adaa 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -1098,6 +1098,7 @@ int ff_pred_weight_table(H264Context *h);
 int ff_set_ref_count(H264Context *h);
 
 int ff_h264_decode_slice_header(H264Context *h, H264Context *h0);
+#define SLICE_SINGLETHREAD 1
 #define SLICE_SKIPED 2
 
 int ff_h264_execute_decode_slices(H264Context *h, unsigned context_count);
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 13b1da7..a0288e0 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1890,7 +1890,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0)
             if (h != h0) {
                 av_log(h->avctx, AV_LOG_ERROR,
                        "Deblocking switched inside frame.\n");
-                return 1;
+                return SLICE_SINGLETHREAD;
             }
         }
     }



More information about the ffmpeg-cvslog mailing list