aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-21 11:40:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 11:45:42 +0100
commit6458e4750f4dc93b7bbbdf08d4de7c9e6ef8ac61 (patch)
treef28ea1938432fdc9c6f250443ed15e03ab44a8f9
parent66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20 (diff)
parent0dea4c77ccf5956561bb8991311b3d834bb5fa40 (diff)
downloadffmpeg-6458e4750f4dc93b7bbbdf08d4de7c9e6ef8ac61.tar.gz
Merge commit '0dea4c77ccf5956561bb8991311b3d834bb5fa40'
* commit '0dea4c77ccf5956561bb8991311b3d834bb5fa40': h264: only ref cur_pic in update_thread_context if it is initialized Conflicts: libavcodec/h264_slice.c See: 0fc01ae33c7712168aab0f98c5715b40da0b5f03 Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/h264_slice.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 70224a5b0b..54bc7bf20a 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -613,8 +613,11 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->cur_pic_ptr = REBASE_PICTURE(h1->cur_pic_ptr, h, h1);
ff_h264_unref_picture(h, &h->cur_pic);
- if (h1->cur_pic.f.buf[0] && (ret = ff_h264_ref_picture(h, &h->cur_pic, &h1->cur_pic)) < 0)
- return ret;
+ if (h1->cur_pic.f.buf[0]) {
+ ret = ff_h264_ref_picture(h, &h->cur_pic, &h1->cur_pic);
+ if (ret < 0)
+ return ret;
+ }
h->workaround_bugs = h1->workaround_bugs;
h->low_delay = h1->low_delay;