[FFmpeg-cvslog] Merge commit '0e7772c5e4f1b31e2a3dda714ba4f89b1cca644a'
Clément Bœsch
git at videolan.org
Mon Jun 20 12:10:14 CEST 2016
ffmpeg | branch: master | Clément Bœsch <clement at stupeflix.com> | Mon Jun 20 12:07:05 2016 +0200| [cbe2dc7275bb7f488cbb6c8cdf98a5f26355c279] | committer: Clément Bœsch
Merge commit '0e7772c5e4f1b31e2a3dda714ba4f89b1cca644a'
* commit '0e7772c5e4f1b31e2a3dda714ba4f89b1cca644a':
h264: remove unused H264SliceContext.rbsp_buffer
Merged-by: Clément Bœsch <clement at stupeflix.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbe2dc7275bb7f488cbb6c8cdf98a5f26355c279
---
libavcodec/h264.c | 6 +-----
libavcodec/h264.h | 4 ----
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index bd9f672..812e7c0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -373,8 +373,6 @@ static av_cold int h264_decode_end(AVCodecContext *avctx)
h->cur_pic_ptr = NULL;
- for (i = 0; i < h->nb_slice_ctx; i++)
- av_freep(&h->slice_ctx[i].rbsp_buffer);
av_freep(&h->slice_ctx);
h->nb_slice_ctx = 0;
@@ -1108,9 +1106,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
goto end;
context_count = 0;
}
- /* Slice could not be decoded in parallel mode, restart. Note
- * that rbsp_buffer is not transferred, but since we no longer
- * run in parallel mode this should not be an issue. */
+ /* Slice could not be decoded in parallel mode, restart. */
sl = &h->slice_ctx[0];
goto again;
}
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 010f688..0cda191 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -450,10 +450,6 @@ typedef struct H264SliceContext {
CABACContext cabac;
uint8_t cabac_state[1024];
int cabac_init_idc;
-
- // rbsp buffer used for this slice
- uint8_t *rbsp_buffer;
- unsigned int rbsp_buffer_size;
} H264SliceContext;
/**
======================================================================
diff --cc libavcodec/h264.c
index bd9f672,9cc0a24..812e7c0
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@@ -1097,20 -946,11 +1095,18 @@@ FF_ENABLE_DEPRECATION_WARNING
context_count = 0;
}
- if (err < 0) {
- av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
+ if (err < 0 || err == SLICE_SKIPED) {
+ if (err < 0)
+ av_log(h->avctx, AV_LOG_ERROR, "decode_slice_header error\n");
sl->ref_count[0] = sl->ref_count[1] = sl->list_count = 0;
- } else if (err == 1) {
+ } else if (err == SLICE_SINGLETHREAD) {
+ if (context_count > 0) {
+ ret = ff_h264_execute_decode_slices(h, context_count);
+ if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
+ goto end;
+ context_count = 0;
+ }
- /* Slice could not be decoded in parallel mode, restart. Note
- * that rbsp_buffer is not transferred, but since we no longer
- * run in parallel mode this should not be an issue. */
+ /* Slice could not be decoded in parallel mode, restart. */
sl = &h->slice_ctx[0];
goto again;
}
More information about the ffmpeg-cvslog
mailing list