From d6e1f53233d7eee5a3cc53d28536be81043973f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 30 Oct 2011 19:30:14 +0000 Subject: [PATCH 1/3] flacenc: remove dead code from header We require a new-enough libflac that this condition will never apply. --- ext/flac/gstflacenc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ext/flac/gstflacenc.h b/ext/flac/gstflacenc.h index a9f38187e5..9084892e3b 100644 --- a/ext/flac/gstflacenc.h +++ b/ext/flac/gstflacenc.h @@ -56,11 +56,8 @@ struct _GstFlacEnc { guint padding; gint seekpoints; -#if !defined(FLAC_API_VERSION_CURRENT) || FLAC_API_VERSION_CURRENT < 8 - FLAC__SeekableStreamEncoder *encoder; -#else FLAC__StreamEncoder *encoder; -#endif + FLAC__StreamMetadata **meta; GstTagList * tags; From 00c8ae733dbeb4a8766d7e8148f81610c6a6ff08 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 31 Oct 2011 15:43:25 +0100 Subject: [PATCH 2/3] matroskamux: do not use unoffical V_MJPEG codec id ... but as not spec'ed especially, consider it a VfW compatibility case. Fixes #659837. --- gst/matroska/matroska-mux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 5204b39a6e..01a171396c 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -796,15 +796,14 @@ skip_details: if (!strcmp (mimetype, "video/x-raw-yuv")) { context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_UNCOMPRESSED); gst_structure_get_fourcc (structure, "format", &videocontext->fourcc); - } else if (!strcmp (mimetype, "image/jpeg")) { - context->codec_id = g_strdup (GST_MATROSKA_CODEC_ID_VIDEO_MJPEG); } else if (!strcmp (mimetype, "video/x-xvid") /* MS/VfW compatibility cases */ ||!strcmp (mimetype, "video/x-huffyuv") || !strcmp (mimetype, "video/x-divx") || !strcmp (mimetype, "video/x-dv") || !strcmp (mimetype, "video/x-h263") || !strcmp (mimetype, "video/x-msmpeg") - || !strcmp (mimetype, "video/x-wmv")) { + || !strcmp (mimetype, "video/x-wmv") + || !strcmp (mimetype, "image/jpeg")) { gst_riff_strf_vids *bih; gint size = sizeof (gst_riff_strf_vids); guint32 fourcc = 0; @@ -861,6 +860,8 @@ skip_details: fourcc = GST_MAKE_FOURCC ('W', 'M', 'V', '3'); } } + } else if (!strcmp (mimetype, "image/jpeg")) { + fourcc = GST_MAKE_FOURCC ('M', 'J', 'P', 'G'); } if (!fourcc) From 57684fee3a83fe5e463ca4a5c56f755f74aac676 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 31 Oct 2011 16:18:32 +0100 Subject: [PATCH 3/3] qtmux: avoid shortcut evaluation when adding paired mp4 tag Fixes (part of) #638711. --- gst/isomp4/gstqtmux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 769578d703..3fa152b7ae 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -572,9 +572,11 @@ gst_qt_mux_add_mp4_tag (GstQTMux * qtmux, const GstTagList * list, if (tag2) { /* paired unsigned integers */ guint count = 0; + gboolean got_tag; - if (!(gst_tag_list_get_uint (list, tag, &value) || - gst_tag_list_get_uint (list, tag2, &count))) + got_tag = gst_tag_list_get_uint (list, tag, &value); + got_tag = gst_tag_list_get_uint (list, tag2, &count) || got_tag; + if (!got_tag) break; GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %u/%u", GST_FOURCC_ARGS (fourcc), value, count);