summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-11-16 01:12:40 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-12-13 21:02:42 +0100
commit072be3e8969f24113d599444be4d6a0ed04a6602 (patch)
tree13b718e04f588a0c81497770abdd7f3cdc8a85ba /libavcodec/h264_ps.c
parent0ee440fe38e2dc355aeb88e72209747c38aab593 (diff)
h264: set parameters from SPS whenever it changes
Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with alternating bit depths.
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index 7555daacb6..0166ad2e94 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -459,10 +459,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
sps->timing_info_present_flag ? sps->time_scale : 0
);
}
+ sps->new = 1;
av_free(h->sps_buffers[sps_id]);
- h->sps_buffers[sps_id]= sps;
- h->sps = *sps;
+ h->sps_buffers[sps_id] = sps;
+ h->sps = *sps;
+ h->current_sps_id = sps_id;
+
return 0;
fail:
av_free(sps);