avcodec: Check against codec format list
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 4 Jun 2015 23:11:02 +0000 (19:11 -0400)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 11 Jun 2015 14:23:33 +0000 (10:23 -0400)
commita33a1bf6e412cbe06fd24f346bd225adda5425fa
treed4bda6ce670ea67dc234ae3dca590d900c60eb02
parent1f1e24f63f98bb552af49de68121946f5c624943
avcodec: Check against codec format list

There exist few formats (deprecated though) used by mjpeg decoder
and encoder that maps to the same GStreamer format. To properly
pick the right format, also lookup each Codec list before accepting
the format. This fixes error when trying to use mjpeg encoder.

Note that this may results in faded colors. In fact, these special
format are meant to specify that this is full range YUV. Colorimetry
in gst-libav is not yet implemented, hence is ignored in general. So
I think it's fine to first fix the issue before addressing the missing
feature.

https://bugzilla.gnome.org/show_bug.cgi?id=750398
ext/libav/gstavcodecmap.c