avdec_* report interlaced content as "mixed" instead of "interleaved"
Submitted by FredT
Link to original bug (#749930)
Description
FFMPEG decoder such as mpeg2dec and libav decoder avdec_h264 does not report interlaced content correctly. This problem could exist in other decoder when producing interlaced output.
Currently the Gstreamer implementation report GST_VIDEO_INTERLACE_MODE_MIXED
To the best of my knowledge, I believe this is wrong as FFMPEG/LIBAV produce Interlace Interleaved frame. 1 frame contains both top and bottom field.
This came to light while testing the new decklink video sink.
I replaced the GST_VIDEO_INTERLACE_MODE_MIXED flag in gstavviddec.c for avdec_h264 and gstmpeg2dec.c for mpeg2 decoder.
After the modification i was able to output video at 1080i59.94 without issues.
Before the change, the following line as an example did not work since decklinksink is expecting interlace-interleaved source:
gst-launch-1.0 -v --gst-debug-level=3 udpsrc uri="udp://239.127.23.2:5724" buffer-size=5000000 ! queue ! tsdemux ! h264parse ! queue ! avdec_h264 ! queue ! videoconvert ! queue ! videorate ! queue ! decklinkvideosink mode=12