[FFmpeg-cvslog] avcodec/hevc: clear tab_slice_address of ctb on error.

Michael Niedermayer git at videolan.org
Sun Feb 23 17:46:58 CET 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Fri Feb  7 04:30:31 2014 +0100| [aa672f5e6af4eaf1166ff95a628f9ac6e6a292b4] | committer: Michael Niedermayer

avcodec/hevc: clear tab_slice_address of ctb on error.

This allows us to detect which areas have failed to decode

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit a18f11158216c22f4a69e44f8cbb59b300a7f10c)

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

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

 libavcodec/hevc.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 6f072b9..4a0907f 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -1825,8 +1825,11 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *isFilterThread)
         s->filter_slice_edges[ctb_addr_rs]  = s->sh.slice_loop_filter_across_slices_enabled_flag;
 
         more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0);
-        if (more_data < 0)
+        if (more_data < 0) {
+            s->tab_slice_address[ctb_addr_rs] = -1;
             return more_data;
+        }
+
 
         ctb_addr_ts++;
         ff_hevc_save_states(s, ctb_addr_ts);
@@ -1892,8 +1895,10 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *input_ctb_row, int
         hls_sao_param(s, x_ctb >> s->sps->log2_ctb_size, y_ctb >> s->sps->log2_ctb_size);
         more_data = hls_coding_quadtree(s, x_ctb, y_ctb, s->sps->log2_ctb_size, 0);
 
-        if (more_data < 0)
+        if (more_data < 0) {
+            s->tab_slice_address[ctb_addr_rs] = -1;
             return more_data;
+        }
 
         ctb_addr_ts++;
 



More information about the ffmpeg-cvslog mailing list