From dd0cd3d2730b93958a34dea7c7890e71d2d72bf6 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Thu, 28 Jan 2010 20:57:29 +0000 Subject: Export H264 profile and level in AVCodecContext. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Rafaël Carré, rafael D carre A gmail Originally committed as revision 21517 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264_parser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libavcodec/h264_parser.c') diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index d9af8c9c36..521597dfa4 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -185,6 +185,9 @@ static inline int parse_nal_units(AVCodecParserContext *s, h->sps = *h->sps_buffers[h->pps.sps_id]; h->frame_num = get_bits(&h->s.gb, h->sps.log2_max_frame_num); + avctx->profile = h->sps.profile_idc; + avctx->level = h->sps.level_idc; + if(h->sps.frame_mbs_only_flag){ h->s.picture_structure= PICT_FRAME; }else{ -- cgit v1.2.3