[Libav-user] Initializing HWAccel decoder, how do I set dec_ctx width and height before opening codec?

Sergio Basurco sergio.b at coherentsynchro.com
Mon Jun 4 11:03:34 EEST 2018


Hi,

I'm setting up my program to use the h264_cuvid decoder. I'm using 
ffmpeg_opt.c, ffmpeg_cuvidĀ  and ffmpeg_hw.c as a reference. When 
initializing the codec must have set the CodecContext width and height. 
Apparently this information should be available in the SPS/PPS.

 From other ffmpeg posts, seems I will have to decode a frame in order 
to get width and height... but I can't since I cannot open the codec, 
due to missing width and height. I'm quite stuck on this.

I cannot see how ffmpeg parses width and height and feeds it into the 
AVCodecContext.

-- 

Saludos / Best regards,

*Sergio Basurco*
Coherent Synchro

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180604/57ab02d8/attachment.html>


More information about the Libav-user mailing list