diff options
author | Dave Robillard <dave@drobilla.net> | 2009-07-22 14:02:16 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-07-22 14:02:16 -0400 |
commit | ef6dbf9be87af7a91a50a910f8578ce3de75846c (patch) | |
tree | ef2ba06906d155c8dee835bdaafa06d09628e8bc /ext/resindvd/resindvdsrc.c | |
parent | ba89c9e518ded3d919461903a444799a5115c34f (diff) | |
parent | 87a97e24d4b4e63dc2fa3a3a12f9b30bfbe54368 (diff) | |
download | gst-plugins-bad-ef6dbf9be87af7a91a50a910f8578ce3de75846c.tar.gz gst-plugins-bad-ef6dbf9be87af7a91a50a910f8578ce3de75846c.tar.bz2 gst-plugins-bad-ef6dbf9be87af7a91a50a910f8578ce3de75846c.zip |
Merge branch 'master' of git://anongit.freedesktop.org/gstreamer/gst-plugins-bad into fdo
Diffstat (limited to 'ext/resindvd/resindvdsrc.c')
-rw-r--r-- | ext/resindvd/resindvdsrc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c index 7b44bf9c..38be6394 100644 --- a/ext/resindvd/resindvdsrc.c +++ b/ext/resindvd/resindvdsrc.c @@ -1904,7 +1904,9 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) gst_structure_set (s, t, G_TYPE_INT, (int) a->audio_format, NULL); g_free (t); - if (a->lang_type) { + /* Check that the language code is flagged and at least somewhat valid + * before putting it in the output structure */ + if (a->lang_type && a->lang_code > 0x100) { t = g_strdup_printf ("audio-%d-language", i); lang_code[0] = (a->lang_code >> 8) & 0xff; lang_code[1] = a->lang_code & 0xff; @@ -1913,7 +1915,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) GST_DEBUG_OBJECT (src, "Audio stream %d is language %s", i, lang_code); } else - GST_DEBUG_OBJECT (src, "Audio stream %d - no language %s", i, lang_code); + GST_DEBUG_OBJECT (src, "Audio stream %d - no language", i); } if (have_audio == FALSE) { @@ -1947,7 +1949,7 @@ rsn_dvdsrc_prepare_streamsinfo_event (resinDvdSrc * src) g_free (t); t = g_strdup_printf ("subpicture-%d-language", i); - if (u->type) { + if (u->type && u->lang_code > 0x100) { lang_code[0] = (u->lang_code >> 8) & 0xff; lang_code[1] = u->lang_code & 0xff; gst_structure_set (s, t, G_TYPE_STRING, lang_code, NULL); |