summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-25 15:17:23 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-01-25 15:17:23 +0000
commitf0e7f52fd60c8f46101c3632e89a325fc7476344 (patch)
treea21b31ad311e2d1f377f2bff8c1e244c16a0df55 /gst-libs/gst
parent9b537a321bcbfe9cbf1657f00d5420af591f2c0c (diff)
downloadgst-plugins-bad-f0e7f52fd60c8f46101c3632e89a325fc7476344.tar.gz
gst-plugins-bad-f0e7f52fd60c8f46101c3632e89a325fc7476344.tar.bz2
gst-plugins-bad-f0e7f52fd60c8f46101c3632e89a325fc7476344.zip
gst-libs/gst/riff/riff-media.c: Add extradata to huffyuv (fixes #165013).
Original commit message from CVS: * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps_with_data): Add extradata to huffyuv (fixes #165013). * gst-libs/gst/riff/riff-read.c: (gst_riff_read_strf_vids_with_data): Fix extradata extraction if it is in the chunk size.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/riff/riff-media.c4
-rw-r--r--gst-libs/gst/riff/riff-read.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index 4a1807d0..b93ff869 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -94,6 +94,10 @@ gst_riff_create_video_caps_with_data (guint32 codec_fcc,
case GST_MAKE_FOURCC ('H', 'F', 'Y', 'U'):
caps = gst_caps_new_simple ("video/x-huffyuv", NULL);
+ if (strf) {
+ gst_caps_set_simple (caps, "bpp",
+ G_TYPE_INT, (int) strf->bit_cnt, NULL);
+ }
if (codec_name)
*codec_name = g_strdup ("Huffman Lossless Codec");
break;
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index fbbbae26..21cdbbca 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -600,6 +600,9 @@ gst_riff_read_strf_vids_with_data (GstRiffRead * riff,
if (len > 0) {
*extradata = gst_buffer_create_sub (buf, strf->size, len);
}
+ } else if (strf->size > sizeof (gst_riff_strf_vids)) {
+ *extradata = gst_buffer_create_sub (buf,
+ sizeof (gst_riff_strf_vids), strf->size - sizeof (gst_riff_strf_vids));
}
/* debug */