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

Sergio Basurco sergio.b at coherentsynchro.com
Tue Jun 5 12:19:56 EEST 2018

What I did was setting aVCodecContext->width and height to something > 
0. (200x200).

The decoder resets these with the correct values while decoding.

Saludos / Best regards,

*Sergio Basurco*
Coherent Synchro

On 04/06/2018 10:03, Sergio Basurco wrote:
> 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
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180605/9f71594c/attachment.html>

More information about the Libav-user mailing list