diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-01-28 20:57:29 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-01-28 20:57:29 +0000 |
commit | dd0cd3d2730b93958a34dea7c7890e71d2d72bf6 (patch) | |
tree | 48c58a0e7833ee80829911b82d99b5a968be6803 /libavcodec/h264.c | |
parent | 88517e9f9d684e58a641cc77b68df377d82fad5b (diff) | |
download | ffmpeg-dd0cd3d2730b93958a34dea7c7890e71d2d72bf6.tar.gz |
Export H264 profile and level in AVCodecContext.
Patch by Rafaël Carré, rafael D carre A gmail
Originally committed as revision 21517 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index dcd239838d..d9b1d5fbcd 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2527,6 +2527,9 @@ 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 (s->avctx->hwaccel && h->current_slice == 1) { if (s->avctx->hwaccel->start_frame(s->avctx, NULL, 0) < 0) return -1; @@ -2560,6 +2563,9 @@ 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; |