mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-17 21:06:17 +00:00
ext/ffmpeg/gstffmpegdemux.c: Allow ffmpeg typefinders to try and typefind very short (<4kB) files.
Original commit message from CVS: * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_type_find): Allow ffmpeg typefinders to try and typefind very short (<4kB) files.
This commit is contained in:
parent
ed36eb0fc5
commit
357aa01ac6
3 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-04-20 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_type_find):
|
||||
Allow ffmpeg typefinders to try and typefind very short (<4kB)
|
||||
files.
|
||||
|
||||
2007-04-12 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
Patch by: Mark Nauwelaerts <manauw at skynet dot be> and
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 9097e252e477e18182f08a032d8860bdee9a0416
|
||||
Subproject commit 765d03a88492fb4ac81d70457f671f3a109e93de
|
|
@ -1113,14 +1113,21 @@ gst_ffmpegdemux_type_find (GstTypeFind * tf, gpointer priv)
|
|||
GstFFMpegDemuxClassParams *params = (GstFFMpegDemuxClassParams *) priv;
|
||||
AVInputFormat *in_plugin = params->in_plugin;
|
||||
gint res = 0;
|
||||
guint64 length;
|
||||
|
||||
/* We want GST_FFMPEG_TYPE_FIND_SIZE bytes, but if the file is shorter than
|
||||
* that we'll give it a try... */
|
||||
length = gst_type_find_get_length (tf);
|
||||
if (length == 0 || length > GST_FFMPEG_TYPE_FIND_SIZE)
|
||||
length = GST_FFMPEG_TYPE_FIND_SIZE;
|
||||
|
||||
if (in_plugin->read_probe &&
|
||||
(data = gst_type_find_peek (tf, 0, GST_FFMPEG_TYPE_FIND_SIZE)) != NULL) {
|
||||
(data = gst_type_find_peek (tf, 0, length)) != NULL) {
|
||||
AVProbeData probe_data;
|
||||
|
||||
probe_data.filename = "";
|
||||
probe_data.buf = data;
|
||||
probe_data.buf_size = GST_FFMPEG_TYPE_FIND_SIZE;
|
||||
probe_data.buf_size = length;
|
||||
|
||||
res = in_plugin->read_probe (&probe_data);
|
||||
if (res > 0) {
|
||||
|
|
Loading…
Reference in a new issue