You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avformat/riffenc: indicate storage of flipped RGB bitmaps
Some legacy applications such as AVI2MVE expect raw RGB bitmaps to be stored bottom-up, whereas our RIFF BITMAPINFOHEADER assumes they are always stored top-down and thus write a negative value for height. This can prevent reading of these files. Option flipped_raw_rgb added to AVI and Matroska muxers which will write positive value for height when enabled. Note that the user has to flip the bitmaps beforehand using other means such as the vflip filter.
This commit is contained in:
@@ -241,7 +241,7 @@ static void put_videoinfoheader2(AVIOContext *pb, AVStream *st)
|
||||
avio_wl32(pb, 0);
|
||||
avio_wl32(pb, 0);
|
||||
|
||||
ff_put_bmp_header(pb, st->codecpar, 0, 1);
|
||||
ff_put_bmp_header(pb, st->codecpar, 0, 1, 0);
|
||||
|
||||
if (st->codecpar->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
|
||||
int padding = (st->codecpar->extradata_size & 3) ? 4 - (st->codecpar->extradata_size & 3) : 0;
|
||||
|
||||
Reference in New Issue
Block a user