mirror of https://github.com/mpv-player/mpv
demux: remove video_read_properties
This commit is contained in:
parent
c4f33d784a
commit
90813f3402
|
@ -2357,25 +2357,20 @@ int reinit_video_chain(struct MPContext *mpctx)
|
||||||
goto no_video;
|
goto no_video;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!video_read_properties(mpctx->sh_video)) {
|
mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] filefmt:%d fourcc:0x%X "
|
||||||
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "Video: Cannot read properties.\n");
|
"size:%dx%d fps:%5.3f ftime:=%6.4f\n",
|
||||||
goto err_out;
|
mpctx->master_demuxer->file_format, mpctx->sh_video->format,
|
||||||
} else {
|
mpctx->sh_video->disp_w, mpctx->sh_video->disp_h,
|
||||||
mp_tmsg(MSGT_CPLAYER, MSGL_V, "[V] filefmt:%d fourcc:0x%X "
|
mpctx->sh_video->fps, mpctx->sh_video->frametime);
|
||||||
"size:%dx%d fps:%5.3f ftime:=%6.4f\n",
|
if (opts->force_fps) {
|
||||||
mpctx->master_demuxer->file_format, mpctx->sh_video->format,
|
mpctx->sh_video->fps = opts->force_fps;
|
||||||
mpctx->sh_video->disp_w, mpctx->sh_video->disp_h,
|
mpctx->sh_video->frametime = 1.0f / mpctx->sh_video->fps;
|
||||||
mpctx->sh_video->fps, mpctx->sh_video->frametime);
|
}
|
||||||
if (opts->force_fps) {
|
update_fps(mpctx);
|
||||||
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) {
|
if (!mpctx->sh_video->fps && !opts->force_fps && !opts->correct_pts) {
|
||||||
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "FPS not specified in the "
|
mp_tmsg(MSGT_CPLAYER, MSGL_ERR, "FPS not specified in the "
|
||||||
"header or invalid, use the -fps option.\n");
|
"header or invalid, use the -fps option.\n");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double ar = -1.0;
|
double ar = -1.0;
|
||||||
|
|
|
@ -164,7 +164,6 @@ typedef struct sh_sub {
|
||||||
struct sh_stream *new_sh_stream(struct demuxer *demuxer, enum stream_type type);
|
struct sh_stream *new_sh_stream(struct demuxer *demuxer, enum stream_type type);
|
||||||
|
|
||||||
// video.c:
|
// video.c:
|
||||||
int video_read_properties(struct sh_video *sh_video);
|
|
||||||
int video_read_frame(struct sh_video *sh_video, float *frame_time_ptr,
|
int video_read_frame(struct sh_video *sh_video, float *frame_time_ptr,
|
||||||
unsigned char **start, int force_fps);
|
unsigned char **start, int force_fps);
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,6 @@
|
||||||
#include "demux.h"
|
#include "demux.h"
|
||||||
#include "stheader.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){
|
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;
|
demux_stream_t *d_video=sh_video->ds;
|
||||||
demuxer_t *demuxer=d_video->demuxer;
|
demuxer_t *demuxer=d_video->demuxer;
|
||||||
|
|
Loading…
Reference in New Issue