forked from FFmpeg/FFmpeg
Set codec_id correctly for RJPG codec_tag
Originally committed as revision 10498 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
a135bea507
commit
efd7428666
1 changed files with 2 additions and 1 deletions
|
@ -85,6 +85,8 @@ static int get_codec_data(ByteIOContext *pb, AVStream *vst,
|
||||||
vst->codec->codec_tag = get_le32(pb);
|
vst->codec->codec_tag = get_le32(pb);
|
||||||
vst->codec->codec_id =
|
vst->codec->codec_id =
|
||||||
codec_get_id(codec_bmp_tags, vst->codec->codec_tag);
|
codec_get_id(codec_bmp_tags, vst->codec->codec_tag);
|
||||||
|
if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
|
||||||
|
vst->codec->codec_id = CODEC_ID_NUV;
|
||||||
} else
|
} else
|
||||||
url_fskip(pb, 4);
|
url_fskip(pb, 4);
|
||||||
|
|
||||||
|
@ -174,7 +176,6 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
|
||||||
|
|
||||||
get_codec_data(pb, vst, ast, is_mythtv);
|
get_codec_data(pb, vst, ast, is_mythtv);
|
||||||
ctx->rtjpg_video = vst->codec->codec_id == CODEC_ID_NUV;
|
ctx->rtjpg_video = vst->codec->codec_id == CODEC_ID_NUV;
|
||||||
ctx->rtjpg_video |= vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G');
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue