summaryrefslogtreecommitdiff
path: root/libavformat/img2.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-07 02:32:59 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-07 02:32:59 +0100
commitc1e2ca1e31e4d244c0c16654bbc9d8964d21b99d (patch)
tree3c89e235adea43a38db310989b1d8b330729a7d7 /libavformat/img2.c
parentff4800c16bae15817b35eaa22d0113849849114b (diff)
Allow auto-detection of ljpg images.
Diffstat (limited to 'libavformat/img2.c')
-rw-r--r--libavformat/img2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 18dde559c4..00c5013015 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -284,6 +284,8 @@ static int read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->split_planes = str && !av_strcasecmp(str + 1, "y");
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = av_str2id(img_tags, s->path);
+ if (st->codec->codec_id = CODEC_ID_LJPEG)
+ st->codec->codec_id = CODEC_ID_MJPEG;
}
if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pix_fmt != PIX_FMT_NONE)
st->codec->pix_fmt = pix_fmt;