qtdemux: make files from Vivotek camera play

Skip tracks of 'vivo' subtype with empty stsd instead of
erroring out saying that the file is broken.

https://bugzilla.gnome.org/show_bug.cgi?id=699791
This commit is contained in:
Tim-Philipp Müller 2013-07-19 19:35:26 +01:00 committed by Tim-Philipp Müller
parent ce52b319ff
commit aa7d597120
2 changed files with 10 additions and 2 deletions

View file

@ -7053,8 +7053,15 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
/* stsd should at least have one entry */
stsd_len = QT_UINT32 (stsd_data);
if (stsd_len < 24)
goto corrupt_file;
if (stsd_len < 24) {
/* .. but skip stream with empty stsd produced by some Vivotek cameras */
if (stream->subtype == FOURCC_vivo) {
g_free (stream);
return TRUE;
} else {
goto corrupt_file;
}
}
GST_LOG_OBJECT (qtdemux, "stsd len: %d", stsd_len);

View file

@ -180,6 +180,7 @@ G_BEGIN_DECLS
#define FOURCC_apco GST_MAKE_FOURCC('a','p','c','o')
#define FOURCC_ap4h GST_MAKE_FOURCC('a','p','4','h')
#define FOURCC_m1v GST_MAKE_FOURCC('m','1','v',' ')
#define FOURCC_vivo GST_MAKE_FOURCC('v','i','v','o')
/* SVQ3 fourcc */
#define FOURCC_SEQH GST_MAKE_FOURCC('S','E','Q','H')