summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-08 00:39:29 +0200
committerwm4 <wm4@nowhere>2013-07-08 00:39:29 +0200
commit90813f340250a3848f66f13a644e74a92ca5d907 (patch)
treed2ef9efab0106afd96a15446fb6e013a168e7518
parentc4f33d784a058325b26ba82f34c43dab0cb19dc8 (diff)
downloadmpv-90813f340250a3848f66f13a644e74a92ca5d907.tar.bz2
mpv-90813f340250a3848f66f13a644e74a92ca5d907.tar.xz
demux: remove video_read_properties
-rw-r--r--core/mplayer.c31
-rw-r--r--demux/stheader.h1
-rw-r--r--demux/video.c4
3 files changed, 13 insertions, 23 deletions
diff --git a/core/mplayer.c b/core/mplayer.c
index 79626fdc80..16277d2e60 100644
--- a/core/mplayer.c
+++ b/core/mplayer.c
@@ -2357,25 +2357,20 @@ int reinit_video_chain(struct MPContext *mpctx)
goto no_video;
}
- if (!video_read_properties(mpctx->sh_video)) {
- mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Video: Cannot read properties.\n");
- goto err_out;
- } else {
- mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] filefmt:%d fourcc:0x%X "
- "size:%dx%d fps:%5.3f ftime:=%6.4f\n",
- mpctx->master_demuxer->file_format, mpctx->sh_video->format,
- mpctx->sh_video->disp_w, mpctx->sh_video->disp_h,
- mpctx->sh_video->fps, mpctx->sh_video->frametime);
- if (opts->force_fps) {
- mpctx->sh_video->fps = opts->force_fps;
- mpctx->sh_video->frametime = 1.0f / mpctx->sh_video->fps;
- }
- update_fps(mpctx);
+ mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] filefmt:%d fourcc:0x%X "
+ "size:%dx%d fps:%5.3f ftime:=%6.4f\n",
+ mpctx->master_demuxer->file_format, mpctx->sh_video->format,
+ mpctx->sh_video->disp_w, mpctx->sh_video->disp_h,
+ mpctx->sh_video->fps, mpctx->sh_video->frametime);
+ if (opts->force_fps) {
+ mpctx->sh_video->fps = opts->force_fps;
+ mpctx->sh_video->frametime = 1.0f / mpctx->sh_video->fps;
+ }
+ update_fps(mpctx);
- if (!mpctx->sh_video->fps && !opts->force_fps && !opts->correct_pts) {
- mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "FPS not specified in the "
- "header or invalid, use the -fps option.\n");
- }
+ if (!mpctx->sh_video->fps && !opts->force_fps && !opts->correct_pts) {
+ mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "FPS not specified in the "
+ "header or invalid, use the -fps option.\n");
}
double ar = -1.0;
diff --git a/demux/stheader.h b/demux/stheader.h
index 68b9076b88..a4ae0b28bb 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -164,7 +164,6 @@ typedef struct sh_sub {
struct sh_stream *new_sh_stream(struct demuxer *demuxer, enum stream_type type);
// video.c:
-int video_read_properties(struct sh_video *sh_video);
int video_read_frame(struct sh_video *sh_video, float *frame_time_ptr,
unsigned char **start, int force_fps);
diff --git a/demux/video.c b/demux/video.c
index 48154905fe..1a7db255bf 100644
--- a/demux/video.c
+++ b/demux/video.c
@@ -33,10 +33,6 @@
#include "demux.h"
#include "stheader.h"
-int video_read_properties(sh_video_t *sh_video){
-return 1;
-}
-
int video_read_frame(sh_video_t* sh_video,float* frame_time_ptr,unsigned char** start,int force_fps){
demux_stream_t *d_video=sh_video->ds;
demuxer_t *demuxer=d_video->demuxer;