summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2014-01-13 15:31:05 (GMT)
committerWim Taymans <wtaymans@redhat.com>2014-01-13 15:31:05 (GMT)
commitead14945aa8d033ce44b86e45a45fbafc4922888 (patch)
treeb8478a1b9bfba34033a859c6daac7db6cfcc0464
parent81cef109e20cbce285bacaf673597aef57fc30f3 (diff)
downloadgst-libav-ead14945aa8d033ce44b86e45a45fbafc4922888.tar.gz
gst-libav-ead14945aa8d033ce44b86e45a45fbafc4922888.tar.xz
avviddec: set output chroma-site
Use libav provided chroma-site and place it on the output caps.
-rw-r--r--ext/libav/gstavviddec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index 9f9fca5..fe9c54a 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -963,6 +963,23 @@ gst_ffmpegviddec_negotiate (GstFFMpegVidDec * ffmpegdec,
else
out_info->interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
+ switch (context->chroma_sample_location) {
+ case 1:
+ out_info->chroma_site = GST_VIDEO_CHROMA_SITE_MPEG2;
+ break;
+ case 2:
+ out_info->chroma_site = GST_VIDEO_CHROMA_SITE_JPEG;
+ break;
+ case 3:
+ out_info->chroma_site = GST_VIDEO_CHROMA_SITE_DV;
+ break;
+ case 4:
+ out_info->chroma_site = GST_VIDEO_CHROMA_SITE_V_COSITED;
+ break;
+ default:
+ break;
+ }
+
/* try to find a good framerate */
if ((in_info->fps_d && in_info->fps_n) ||
GST_VIDEO_INFO_FLAG_IS_SET (in_info, GST_VIDEO_FLAG_VARIABLE_FPS)) {