I am using FFMpeg libraries in C/C++ to develop a media player .
This source uses the following code to find the decoder of a video stream in a file :
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
,
where pCodecCtx is the pointer to the Codec Context of the video stream and pCodec is a pointer to AVCodec which was initialised to NULL .
If we have to explicitly find the decoder , then what is the struct AVCodec *codec
found in struct AVCodecContext
? This is defined here . Can someone please help me understand it's use .