Skip to content

Commit

Permalink
h264: reset current_slice on context reinit
Browse files Browse the repository at this point in the history
This fixes a null pointer dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Apr 18, 2012
1 parent 9f39d3d commit 8201092
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libavcodec/h264.c
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
flush_dpb(s->avctx);
ff_MPV_common_end(s);
h->list_count = 0;
h->current_slice = 0;
}
if (!s->context_initialized) {
if (h != h0) {
Expand Down

0 comments on commit 8201092

Please sign in to comment.