I'm a bit rusty on hacking codecs for FFmpeg, but I just checked out the latest git source and I'm assuming that you are working from the same copy. I am further assuming that you inserted your decoder alongside the rest of the codecs in the libavcodec/ directory and that when you build the program and run ffmpeg -formats
, you see your new decoder mentioned.
If this is all true, then I will assume that your decoder module exports an init() function which expects to receive a pointer to a AVCodecContext
function. This data structure has a member named pix_fmt and this should be set to AV_PIX_FMT_YUV420P in your decoder's case in order to indicate planar YUV 4:2:0.
If this doesn't work, try using the ffmpeg
tool to decode the file to the null target, just to test that your decoder is doing something:
ffmpeg -i yourfile.ext -f null /dev/null
Amend your question with the output from this command to give us further clues.