[FFmpeg-devel] [PATCH] Fix Raw rgb/bgr Vertical Flip in AviSynth
Reimar Döffinger
Reimar.Doeffinger
Sat Aug 29 14:46:07 CEST 2009
On Sun, Aug 23, 2009 at 11:39:50PM -0700, Josh Harris wrote:
> Index: libavformat/avisynth.c
> ===================================================================
> --- libavformat/avisynth.c (revision 19254)
> +++ libavformat/avisynth.c (working copy)
> @@ -124,6 +124,14 @@
> st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, imgfmt.bmiHeader.biCompression);
>
> st->duration = stream->info.dwLength;
> +
> + if (st->codec->codec_tag == 0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){
Going by codec_tag seems simply wrong, sure it shouldn't be codec_id?
> + st->codec->extradata_size += 9;
> + st->codec->extradata = av_realloc(st->codec->extradata, st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
> + if (st->codec->extradata)
> + memcpy(st->codec->extradata + st->codec->extradata_size - 9, "BottomUp", 9);
> + }
Why all the mess? It seems to me that extradata is never set, so why use
realloc etc.? Similar to r19698 should be enough I think.
> + st->codec->height = FFABS(st->codec->height);
Is there a sample for that (height < 0)?
More information about the ffmpeg-devel
mailing list