[MPlayer-cvslog] r29882 - trunk/libmpdemux/demux_lavf.c
reimar
subversion at mplayerhq.hu
Tue Nov 10 17:49:00 CET 2009
Author: reimar
Date: Tue Nov 10 17:49:00 2009
New Revision: 29882
Log:
Allow lavf demuxer to also probe and play files < 32 kB (full probe buffer size).
Based on patch by On2.
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c Tue Nov 10 17:24:16 2009 (r29881)
+++ trunk/libmpdemux/demux_lavf.c Tue Nov 10 17:49:00 2009 (r29882)
@@ -133,6 +133,7 @@ static int lavf_check_file(demuxer_t *de
AVProbeData avpd;
uint8_t buf[PROBE_BUF_SIZE];
lavf_priv_t *priv;
+ int probe_data_size;
if(!demuxer->priv)
demuxer->priv=calloc(sizeof(lavf_priv_t),1);
@@ -154,11 +155,12 @@ static int lavf_check_file(demuxer_t *de
return DEMUXER_TYPE_LAVF;
}
- if(stream_read(demuxer->stream, buf, PROBE_BUF_SIZE)!=PROBE_BUF_SIZE)
+ probe_data_size = stream_read(demuxer->stream, buf, PROBE_BUF_SIZE);
+ if(probe_data_size <= 0)
return 0;
avpd.filename= demuxer->stream->url;
avpd.buf= buf;
- avpd.buf_size= PROBE_BUF_SIZE;
+ avpd.buf_size= probe_data_size;
priv->avif= av_probe_input_format(&avpd, 1);
if(!priv->avif){
More information about the MPlayer-cvslog
mailing list