Hello guys,
what would be the correct way to parse H264 SPS nad PPS so I can get width, 
height, etc.

I'm trying something like this but it does nothing

AVCodecParserContext *parser = av_parser_init(AV_CODEC_ID_H264);

AVCodec *pCodec = avcodec_find_decoder(AV_CODEC_ID_H264);
AVCodecContext *pCodecCtx = avcodec_alloc_context3(pCodec);

pCodecCtx = avcodec_alloc_context3(pCodec);

uint8_t* poutbuf = nullptr;
int poutbuf_size = 0;

int len = av_parser_parse2(parser, pCodecCtx, &poutbuf, &poutbuf_size, pSps, 
sps_size, 0, 0, 0);

Best regards Ivan
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to