mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/riffenc: Also check codec tag before setting raw_pal_avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a2f8beef2d
commit
0910488a16
|
@ -212,6 +212,7 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc,
|
||||||
int raw_pal_avi;
|
int raw_pal_avi;
|
||||||
|
|
||||||
raw_pal_avi = !for_asf && enc->codec_id == AV_CODEC_ID_RAWVIDEO &&
|
raw_pal_avi = !for_asf && enc->codec_id == AV_CODEC_ID_RAWVIDEO &&
|
||||||
|
!enc->codec_tag &&
|
||||||
enc->bits_per_coded_sample >= 1 && enc->bits_per_coded_sample <= 8;
|
enc->bits_per_coded_sample >= 1 && enc->bits_per_coded_sample <= 8;
|
||||||
if (!enc->extradata_size && raw_pal_avi)
|
if (!enc->extradata_size && raw_pal_avi)
|
||||||
extradata_size = 4 * (1 << enc->bits_per_coded_sample);
|
extradata_size = 4 * (1 << enc->bits_per_coded_sample);
|
||||||
|
|
Loading…
Reference in New Issue