diff options
author | Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> | 2010-04-15 08:30:48 +0000 |
---|---|---|
committer | Gwenole Beauchesne <gbeauchesne@splitted-desktop.com> | 2010-04-15 08:30:48 +0000 |
commit | fa37cf0db333b3ddf7ec84725edbddaec6ea446b (patch) | |
tree | 30f8c08add4cc1f37c32f21cd9ad15189e2b5d98 /libavcodec/h264.c | |
parent | b08e38e8c3faf092155b2ed7772c5392712cb473 (diff) | |
download | ffmpeg-fa37cf0db333b3ddf7ec84725edbddaec6ea446b.tar.gz |
H.264: move avctx->{profile,level} init before AVCodecContext.get_format().
Originally committed as revision 22884 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 59e644884f..d4d9d21e1d 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1777,6 +1777,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ } h->sps = *h0->sps_buffers[h->pps.sps_id]; + s->avctx->profile = h->sps.profile_idc; + s->avctx->level = h->sps.level_idc; s->avctx->refs= h->sps.ref_frame_count; if(h == h0 && h->dequant_coeff_pps != pps_id){ @@ -2818,9 +2820,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ if((err = decode_slice_header(hx, h))) break; - avctx->profile = hx->sps.profile_idc; - avctx->level = hx->sps.level_idc; - if (h->current_slice == 1) { if (s->avctx->hwaccel && s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0) return -1; @@ -2856,9 +2855,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){ if ((err = decode_slice_header(hx, h)) < 0) break; - avctx->profile = hx->sps.profile_idc; - avctx->level = hx->sps.level_idc; - hx->s.data_partitioning = 1; break; |