From 3269bd178020c5d821e8b2d1fd807a38d63e93ce Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 21:58:11 +0200 Subject: demux: rewrite probing and demuxer initialization Get rid of the strange and messy reliance on DEMUXER_TYPE_ constants. Instead of having two open functions for the demuxer callbacks (which somehow are both optional, but you can also decide to implement both...), just have one function. This function takes a parameter that tells the demuxer how strictly it should check for the file headers. This is a nice simplification and allows more flexibility. Remove the file extension code. This literally did nothing (anymore). Change demux_lavf so that we check our other builtin demuxers first before libavformat tries to guess by file extension. --- core/mplayer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/mplayer.c') diff --git a/core/mplayer.c b/core/mplayer.c index ecaa9dd10b..de6b4132fd 100644 --- a/core/mplayer.c +++ b/core/mplayer.c @@ -2297,9 +2297,9 @@ int reinit_video_chain(struct MPContext *mpctx) goto no_video; } - mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] filefmt:%d fourcc:0x%X " + mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] fourcc:0x%X " "size:%dx%d fps:%5.3f\n", - mpctx->master_demuxer->file_format, mpctx->sh_video->format, + mpctx->sh_video->format, mpctx->sh_video->disp_w, mpctx->sh_video->disp_h, mpctx->sh_video->fps); if (opts->force_fps) @@ -2459,7 +2459,7 @@ static struct demux_packet *video_read_frame(struct MPContext *mpctx) double d = next_pts == MP_NOPTS_VALUE ? sh_video->last_pts - pts1 : next_pts - sh_video->last_pts; if (d >= 0) { - if (demuxer->file_format == DEMUXER_TYPE_TV) { + if (demuxer->type == DEMUXER_TYPE_TV) { if (d > 0) sh_video->fps = 1.0f / d; frame_time = d; -- cgit v1.2.3