diff h264.c @ 11047:ec682347e19e libavcodec

Export H264 profile and level in AVCodecContext. Patch by Rafa¸«³l Carr¸«±, rafael D carre A gmail
author cehoyos
date Thu, 28 Jan 2010 20:57:29 +0000
parents b37a53d101c3
children 4a95670ed5f1
line wrap: on
line diff
--- a/h264.c	Thu Jan 28 20:15:19 2010 +0000
+++ b/h264.c	Thu Jan 28 20:57:29 2010 +0000
@@ -2527,6 +2527,9 @@
             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 @@
             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;