summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_lavf.c1
-rw-r--r--demux/demux_mf.c6
-rw-r--r--demux/demux_mkv.c1
-rw-r--r--demux/demux_timeline.c1
-rw-r--r--demux/stheader.h1
5 files changed, 9 insertions, 1 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index 1092911f50..942f29e61a 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -714,6 +714,7 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
strcmp(priv->avif->name, "image2pipe") == 0
)) {
MP_VERBOSE(demuxer, "Assuming this is an image format.\n");
+ sh->image = true;
sh->codec->fps = priv->mf_fps;
}
sh->codec->par_w = st->sample_aspect_ratio.num;
diff --git a/demux/demux_mf.c b/demux/demux_mf.c
index 40f94f4e4e..69fa0fa91c 100644
--- a/demux/demux_mf.c
+++ b/demux/demux_mf.c
@@ -381,8 +381,12 @@ static int demux_open_mf(demuxer_t *demuxer, enum demux_check check)
// create a new video stream header
struct sh_stream *sh = demux_alloc_sh_stream(STREAM_VIDEO);
- struct mp_codec_params *c = sh->codec;
+ if (mf->nr_of_files == 1) {
+ MP_VERBOSE(demuxer, "Assuming this is an image format.\n");
+ sh->image = true;
+ }
+ struct mp_codec_params *c = sh->codec;
c->codec = codec;
c->disp_w = 0;
c->disp_h = 0;
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index d07f8fe1e0..b0117f0b6d 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1300,6 +1300,7 @@ static void add_coverart(struct demuxer *demuxer)
sh->attached_picture->pts = 0;
talloc_steal(sh, sh->attached_picture);
sh->attached_picture->keyframe = true;
+ sh->image = true;
}
sh->title = att->name;
demux_add_sh_stream(demuxer, sh);
diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
index 9b4a049aee..5572fb53bf 100644
--- a/demux/demux_timeline.c
+++ b/demux/demux_timeline.c
@@ -525,6 +525,7 @@ static void apply_meta(struct sh_stream *dst, struct sh_stream *src)
dst->missing_timestamps = src->missing_timestamps;
if (src->attached_picture)
dst->attached_picture = src->attached_picture;
+ dst->image = src->image;
}
// This is mostly for EDL user-defined metadata.
diff --git a/demux/stheader.h b/demux/stheader.h
index 6be3b16463..8d2129e05b 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -48,6 +48,7 @@ struct sh_stream {
bool dependent_track; // container dependent track flag
bool visual_impaired_track; // container flag
bool hearing_impaired_track;// container flag
+ bool image; // video stream is an image
bool still_image; // video stream contains still images
int hls_bitrate;