Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-07-01 21:59:41 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-07-01 22:39:09 +0300
commit77eb05a2f11f03c98837fa5350d17a8a1c5a2a3d (patch)
tree98180bf4e2afa3961cb6dc6c7c6c44c9a39348c8 /libavcodec/h264_slice.c
parent92bf87db294c0544168f572ba6739db7d2ba2ba3 (diff)
avcodec/h264_slice: Only call ff_h264_flush_change() on initialized contexts
Changed by committer to ensure context_initialized is reset Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 427554c44e..ca492ba6ab 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1415,6 +1415,7 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
}
if (!h->context_initialized || must_reinit || needs_reinit) {
+ int flush_changes = h->context_initialized;
h->context_initialized = 0;
if (sl != h->slice_ctx) {
av_log(h->avctx, AV_LOG_ERROR,
@@ -1428,7 +1429,8 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
av_assert1(first_slice);
- ff_h264_flush_change(h);
+ if(flush_changes)
+ ff_h264_flush_change(h);
if ((ret = get_pixel_format(h, 1)) < 0)
return ret;