Try using PIX_FMT_YUV
J422P instead of PIX_FMT_YUV422P.
I found that in
this[
^] forum question. That question and answer is from Oct. 2012, so things could have changed.
If that does not solve your problem, I noticed the following comment in
pixfmt.h
:
AV_PIX_FMT_YUVJ422P,
So you may just have to specify the color range to make it work. Unfortunately, I don't know the right way to do that off-hand (I have only used the MJPEG decoder, not the encoder).
As a side-note, I believe you should change your naming convention from
PIX_FMT_xxxx
to the newer
AV_PIX_FMT_xxxx
. However, they do have the same value in their respective enums, so that is not your problem.
Soren Madsen