Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
- index 427554c..a8b08cd 100644
- --- a/libavcodec/h264_slice.c
- +++ b/libavcodec/h264_slice.c
- @@ -1415,7 +1415,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
- }
- if (!h->context_initialized || must_reinit || needs_reinit) {
- - h->context_initialized = 0;
- if (sl != h->slice_ctx) {
- av_log(h->avctx, AV_LOG_ERROR,
- "changing width %d -> %d / height %d -> %d on "
- @@ -1428,8 +1427,10 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
- av_assert1(first_slice);
- - ff_h264_flush_change(h);
- + if(h->context_initialized)
- + ff_h264_flush_change(h);
- + h->context_initialized = 0;
- if ((ret = get_pixel_format(h, 1)) < 0)
- return ret;
- h->avctx->pix_fmt = ret;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement