Mercurial > libavcodec.hg
changeset 11633:d47bd24cb380 libavcodec
H.264: move avctx->{profile,level} init before AVCodecContext.get_format().
author | gb |
---|---|
date | Thu, 15 Apr 2010 08:30:48 +0000 |
parents | 9a5c269f31f5 |
children | 456b580e244c |
files | h264.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Thu Apr 15 08:27:06 2010 +0000 +++ b/h264.c Thu Apr 15 08:30:48 2010 +0000 @@ -1777,6 +1777,8 @@ } 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 @@ 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 @@ 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;