[FFmpeg-devel] [PATCH] Export H264 profile/level in AVCodecContext

Michael Niedermayer michaelni
Thu Jan 28 21:41:12 CET 2010


On Thu, Jan 28, 2010 at 07:05:56PM +0100, Rafa?l Carr? wrote:
> On Thu, 28 Jan 2010 16:53:02 +0100
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Thu, Jan 28, 2010 at 02:02:29PM +0100, Rafa?l Carr? wrote:
> 
> > > diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> > > index e4a47cf..1ebe931 100644
> > > --- a/libavcodec/h264.c
> > > +++ b/libavcodec/h264.c
> > > @@ -2589,7 +2589,10 @@ static int decode_nal_units(H264Context *h,
> > > const uint8_t *buf, int buf_size){ break;
> > >          case NAL_SPS:
> > >              init_get_bits(&s->gb, ptr, bit_length);
> > > -            ff_h264_decode_seq_parameter_set(h);
> > > +            if(!ff_h264_decode_seq_parameter_set(h)) {
> > > +                avctx->profile = h->sps.profile_idc;
> > > +                avctx->level   = h->sps.level_idc;
> > > +            }
> > 
> > The  active profile should be exportet not the one of the last sps
> 
> Move export after decoding of slice header
> 
> Bump avcodec minor version
> 
> -- 
> Rafa?l Carr?

>  avcodec.h     |   12 +++++++++++-
>  h264.c        |    6 ++++++
>  h264_parser.c |    3 +++
>  3 files changed, 20 insertions(+), 1 deletion(-)
> c682b8593b71569533aa96834c12d443c53d1a84  h264-profile-level_2_.diff

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100128/ac3eceeb/attachment.pgp>



More information about the ffmpeg-devel mailing list