mirror of
https://github.com/mpv-player/mpv
synced 2024-12-17 12:25:03 +00:00
This just corrects a function name to match the other demuxer's
"xxx_check_file" convention, adds a verbose note about (to match the other demuxers) patch by Kees Cook <mplayer@outflux.net> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7595 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9561550982
commit
0dfb266f56
libmpdemux
@ -59,12 +59,15 @@ void demux_seek_rawdv(demuxer_t *demuxer,float rel_seek_secs,int flags)
|
||||
frames->current_filepos=newpos*frames->frame_size;
|
||||
}
|
||||
|
||||
int check_file_rawdv(demuxer_t *demuxer)
|
||||
int rawdv_check_file(demuxer_t *demuxer)
|
||||
{
|
||||
unsigned char tmp_buffer[DV_PAL_FRAME_SIZE];
|
||||
int bytes_read=0;
|
||||
int result=0;
|
||||
dv_decoder_t *td;
|
||||
|
||||
mp_msg(MSGT_DEMUX,MSGL_V,"Checking for DV\n");
|
||||
|
||||
stream_reset(demuxer->stream);
|
||||
stream_seek(demuxer->stream, 0);
|
||||
bytes_read=stream_read(demuxer->stream,tmp_buffer,DV_PAL_FRAME_SIZE);
|
||||
@ -105,7 +108,7 @@ int demux_rawdv_fill_buffer(demuxer_t *demuxer)
|
||||
dp_video->pos=frames->current_filepos;
|
||||
dp_video->flags=0;
|
||||
|
||||
if (demuxer->audio)
|
||||
if (demuxer->audio && demuxer->audio->id!=-2)
|
||||
{
|
||||
demux_packet_t* dp_audio=clone_demux_packet(dp_video);
|
||||
ds_add_packet(demuxer->audio,dp_audio);
|
||||
|
@ -516,7 +516,7 @@ int demux_open_bmp(demuxer_t* demuxer);
|
||||
int demux_open_roq(demuxer_t* demuxer);
|
||||
#ifdef HAVE_LIBDV095
|
||||
int demux_open_rawdv(demuxer_t* demuxer);
|
||||
extern int check_file_rawdv(demuxer_t *demuxer);
|
||||
extern int rawdv_check_file(demuxer_t *demuxer);
|
||||
#endif
|
||||
|
||||
extern int vivo_check_file(demuxer_t *demuxer);
|
||||
@ -831,7 +831,7 @@ if(file_format==DEMUXER_TYPE_MPEG_ES){ // little hack, see above!
|
||||
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_RAWDV)
|
||||
{
|
||||
demuxer=new_demuxer(stream,DEMUXER_TYPE_RAWDV,audio_id,video_id,dvdsub_id);
|
||||
if(check_file_rawdv(demuxer))
|
||||
if(rawdv_check_file(demuxer))
|
||||
{
|
||||
mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"RAWDV");
|
||||
file_format=DEMUXER_TYPE_RAWDV;
|
||||
|
Loading…
Reference in New Issue
Block a user