summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--player/video.c2
-rw-r--r--video/decode/dec_video.c6
-rw-r--r--video/decode/dec_video.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/player/video.c b/player/video.c
index 3a7d6b1e20..f713a86f41 100644
--- a/player/video.c
+++ b/player/video.c
@@ -337,7 +337,7 @@ int init_video_decoder(struct MPContext *mpctx, struct track *track)
MP_INFO(mpctx, "Use --no-correct-pts to force FPS based timing.\n");
}
- if (!video_init_best_codec(d_video, d_video->opts->video_decoders))
+ if (!video_init_best_codec(d_video))
goto err_out;
return 1;
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index 2b01b544cc..05de748e69 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -126,15 +126,17 @@ static const struct vd_functions *find_driver(const char *name)
return NULL;
}
-bool video_init_best_codec(struct dec_video *d_video, char* video_decoders)
+bool video_init_best_codec(struct dec_video *d_video)
{
+ struct MPOpts *opts = d_video->opts;
+
assert(!d_video->vd_driver);
video_reset(d_video);
d_video->has_broken_packet_pts = -10; // needs 10 packets to reach decision
struct mp_decoder_entry *decoder = NULL;
struct mp_decoder_list *list =
- mp_select_video_decoders(d_video->header->codec->codec, video_decoders);
+ mp_select_video_decoders(d_video->header->codec->codec, opts->video_decoders);
mp_print_decoders(d_video->log, MSGL_V, "Codec list:", list);
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h
index dd2a39b2d2..9d69e0c73b 100644
--- a/video/decode/dec_video.h
+++ b/video/decode/dec_video.h
@@ -76,7 +76,7 @@ struct dec_video {
struct mp_decoder_list *video_decoder_list(void);
-bool video_init_best_codec(struct dec_video *d_video, char* video_decoders);
+bool video_init_best_codec(struct dec_video *d_video);
void video_uninit(struct dec_video *d_video);
void video_work(struct dec_video *d_video);