[Libav-user] Invalid data found when processing input - UPDATE

Hendrik Leppkes h.leppkes at gmail.com
Fri Feb 19 18:45:46 CET 2016


On Fri, Feb 19, 2016 at 5:37 PM,  <francesco at bltitalia.com> wrote:
> HI
> it seems that the cause is in h264 format. It's not annex b but avc1.
> The question is: how can I supply to avcodec_decode_video2 this format ?
> Either setting the flag is_avc to one:
>
>    if(av_opt_set_int(pCodecCtx_qt->priv_data,"is_avc",(int64_t)1,AV_OPT_TYPE
> _INT)!=0)
>          { strerr.printf("##### Wrong Option  format");}
>
> the results is the same. Where I can find an example for decoding h264-avc1
> using avcodec_decode_video2 ?

avc1-style h264 needs to have valid extradata set in the codeccontext
(AVCodecContext->extradata(_size)). This is then used to identify that
its avc1 and some other needed properties extracted as well.

- Hendrik


More information about the Libav-user mailing list