[FFmpeg-devel] [PATCH] lavc/mediacodecdec_h264: use ff_h264_decode_extradata to extract PPS/SPS

Matthieu Bouron matthieu.bouron at gmail.com
Mon Jun 20 12:03:58 CEST 2016


On Sun, Jun 19, 2016 at 07:44:44PM +0200, Matthieu Bouron wrote:
> On Mon, Jun 13, 2016 at 02:37:29PM +0200, Matthieu Bouron wrote:
> > On Mon, Jun 13, 2016 at 12:23:07PM +0200, Hendrik Leppkes wrote:
> > > On Mon, Jun 13, 2016 at 11:51 AM, Matthieu Bouron
> > > <matthieu.bouron at gmail.com> wrote:
> > > > On Fri, Jun 10, 2016 at 03:08:48PM +0200, Matthieu Bouron wrote:
> > > >> From: Matthieu Bouron <matthieu.bouron at stupeflix.com>
> > > >>
> > > >> Fixes playback of HLS streams on MediaTek devices which requires PPS/SPS
> > > >> to be set in their respective csd-{0,1} buffers.
> > > >> ---
> > > >>
> > > >> Hello,
> > > >>
> > > >> The attached patch fixes playback of HLS streams on MediaTek devices which
> > > >> requires PPS/SPS to be set in their respetive csd-{0,1} buffers (instead of
> > > >> having sps+pps in the csd-0 which works on other devices).
> > > >>
> > > >> I'm not sure if I can use the ff_h264_decode_extradata this way (or at least
> > > >> initialize the H264Context with zeroes minus the avctx field).
> > > >
> > > > Rebased patch (after the h264 ps merged) attached.
> > > >
> > > > I still have the same question, is my use of
> > > > H264Context + ff_h264_decode_extradata correct ?
> > > >
> > > 
> > > Using H264 decoder internals seems to be a rather unfortunate
> > > solution, as its prone to breakage, often subtle, as the h264 decoder
> > > gets changed and not all inter-module dependencies are known.
> > > So if possible at all, not using something that uses H264Context for
> > > example would be nice.
> > > 
> > > For the record, ff_h264_decode_extradata is scheduled for refactoring
> > > to make it independent of H264Context so it can be more easily shared
> > > with the h264 decoder and the h264 parser.
> > > Once that is done, it may give you a cleaner interface to use it from
> > > mediacodec as well.
> > 
> > Ok. I can wait for the refactor to be merged but the MediaCodec decoder
> > will remain broken on those devices. I'm not too happy about that if a
> > release is to be made in those following days. Do we have an ETA ?  I'm
> > also not too happy to write the same parsing code as I did before for the
> > AVCC format to split/extract the PPS/SPS.
> > 
> > Or ..., I can push this code (if its use is valid) and update it when the
> > merge lands (I'm helping Clément with the merges, so I will take care
> > about this part).
> 
> Updated patch attached (using the new ff_h264_decode_extradata API).
> 

Correct patch attached (the previous one was incorrect).

[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavc-mediacodecdec_h264-use-ff_h264_decode_extradata.patch
Type: text/x-diff
Size: 6873 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160620/359f7f27/attachment.patch>


More information about the ffmpeg-devel mailing list