aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-19 19:29:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-19 21:46:11 +0100
commit8ea4a5533f4dd187211c2ad13ead4142f266400d (patch)
tree8974c28baebc590bea4998fd2c8a48a1aab52a2b /libavcodec
parentafc03268b4525d0f53ca34b6b3874a40b5f75071 (diff)
downloadffmpeg-8ea4a5533f4dd187211c2ad13ead4142f266400d.tar.gz
h264: move h264_set_parameter_from_sps() call up
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 7303418f3e..1634b1cdc0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2602,6 +2602,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->current_sps_id = h->pps.sps_id;
h->sps = *h0->sps_buffers[h->pps.sps_id];
+
+ if ((ret = h264_set_parameter_from_sps(h)) < 0)
+ return ret;
}
s->avctx->profile = ff_h264_get_profile(&h->sps);
@@ -2658,9 +2661,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
s->avctx->sample_aspect_ratio = h->sps.sar;
av_assert0(s->avctx->sample_aspect_ratio.den);
- if ((ret = h264_set_parameter_from_sps(h)) < 0)
- return ret;
-
if (h->sps.video_signal_type_present_flag) {
s->avctx->color_range = h->sps.full_range>0 ? AVCOL_RANGE_JPEG
: AVCOL_RANGE_MPEG;