summaryrefslogtreecommitdiff
path: root/src/video_dec/yuv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_dec/yuv.c')
-rw-r--r--src/video_dec/yuv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_dec/yuv.c b/src/video_dec/yuv.c
index db7d01d91..91f8ed2b8 100644
--- a/src/video_dec/yuv.c
+++ b/src/video_dec/yuv.c
@@ -65,6 +65,7 @@ typedef struct yuv_decoder_s {
int progressive;
int top_field_first;
+ int color_matrix;
} yuv_decoder_t;
@@ -108,6 +109,8 @@ static void yuv_decode_data (video_decoder_t *this_gen,
this->progressive = buf->decoder_info[3];
this->top_field_first = buf->decoder_info[4];
+ this->color_matrix = 4; /* undefined, mpeg range */
+
free (this->buf);
this->buf = NULL;
@@ -180,6 +183,9 @@ static void yuv_decode_data (video_decoder_t *this_gen,
src = this->buf;
}
+ if (buf->decoder_flags & BUF_FLAG_COLOR_MATRIX)
+ this->color_matrix = buf->decoder_info[4];
+
if (buf->decoder_flags & BUF_FLAG_FRAME_END) {
if (buf->type == BUF_VIDEO_YUY2) {
@@ -281,7 +287,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
}
- VO_SET_FLAGS_CM (this->height >= 720 ? 2 : 10, img->flags);
+ VO_SET_FLAGS_CM (this->color_matrix, img->flags);
img->duration = this->video_step;
img->pts = buf->pts;