mirror of https://github.com/mpv-player/mpv
Revert "demux_mkv: check if the video codec is an image"
This reverts commit 4709a94aec
.
This commit is contained in:
parent
adcc6794b5
commit
289b3a432e
|
@ -234,17 +234,6 @@ static const char *const type_to_codec[][2] = {
|
||||||
{0}
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool mp_codec_is_image(const char *codec)
|
|
||||||
{
|
|
||||||
if (codec) {
|
|
||||||
for (int n = 0; type_to_codec[n][0]; n++) {
|
|
||||||
if (strcasecmp(type_to_codec[n][1], codec) == 0)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *mp_map_type_to_image_codec(const char *type)
|
const char *mp_map_type_to_image_codec(const char *type)
|
||||||
{
|
{
|
||||||
if (type) {
|
if (type) {
|
||||||
|
|
|
@ -28,7 +28,6 @@ void mp_set_codec_from_tag(struct mp_codec_params *c);
|
||||||
void mp_set_pcm_codec(struct mp_codec_params *c, bool sign, bool is_float,
|
void mp_set_pcm_codec(struct mp_codec_params *c, bool sign, bool is_float,
|
||||||
int bits, bool is_be);
|
int bits, bool is_be);
|
||||||
|
|
||||||
bool mp_codec_is_image(const char *codec);
|
|
||||||
const char *mp_map_type_to_image_codec(const char *type);
|
const char *mp_map_type_to_image_codec(const char *type);
|
||||||
const char *mp_map_mimetype_to_video_codec(const char *mimetype);
|
const char *mp_map_mimetype_to_video_codec(const char *mimetype);
|
||||||
|
|
||||||
|
|
|
@ -1526,10 +1526,6 @@ static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *codec = sh_v->codec ? sh_v->codec : "";
|
const char *codec = sh_v->codec ? sh_v->codec : "";
|
||||||
if (mp_codec_is_image(codec)) {
|
|
||||||
sh->still_image = true;
|
|
||||||
sh->image = true;
|
|
||||||
}
|
|
||||||
if (!strcmp(codec, "mjpeg")) {
|
if (!strcmp(codec, "mjpeg")) {
|
||||||
sh_v->codec_tag = MKTAG('m', 'j', 'p', 'g');
|
sh_v->codec_tag = MKTAG('m', 'j', 'p', 'g');
|
||||||
track->require_keyframes = true;
|
track->require_keyframes = true;
|
||||||
|
|
Loading…
Reference in New Issue