Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.90 KB | None | 0 0
  1. diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
  2. index 427554c..a8b08cd 100644
  3. --- a/libavcodec/h264_slice.c
  4. +++ b/libavcodec/h264_slice.c
  5. @@ -1415,7 +1415,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
  6.      }
  7.  
  8.      if (!h->context_initialized || must_reinit || needs_reinit) {
  9. -        h->context_initialized = 0;
  10.          if (sl != h->slice_ctx) {
  11.              av_log(h->avctx, AV_LOG_ERROR,
  12.                     "changing width %d -> %d / height %d -> %d on "
  13. @@ -1428,8 +1427,10 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl)
  14.  
  15.          av_assert1(first_slice);
  16.  
  17. -        ff_h264_flush_change(h);
  18. +        if(h->context_initialized)
  19. +            ff_h264_flush_change(h);
  20.  
  21. +        h->context_initialized = 0;
  22.          if ((ret = get_pixel_format(h, 1)) < 0)
  23.              return ret;
  24.          h->avctx->pix_fmt = ret;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement