[FFmpeg-devel] avcodec/proresdec : add 12b decoding support
Michael Niedermayer
michael at niedermayer.cc
Mon Nov 26 01:32:38 EET 2018
On Sat, Nov 24, 2018 at 08:59:50PM +0100, Martin Vignali wrote:
> proresdec2.c | 5 +++++
> 1 file changed, 5 insertions(+)
> 99ab52ec787a2de79da37daa0e17c7885fcb558f 0010-avcodec-proresdec-align-height-buffer-to-16-avoid-se.patch
> From 3c319ed4ef51e25bccfa0b4fc50edf0bcebf2f0a Mon Sep 17 00:00:00 2001
> From: Martin Vignali <martin.vignali at gmail.com>
> Date: Sat, 17 Nov 2018 23:47:59 +0100
> Subject: [PATCH 10/11] avcodec/proresdec : align height buffer to 16 (avoid
> segfault)
>
> ---
> libavcodec/proresdec2.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
> index 8a537eed1a..f819f8db21 100644
> --- a/libavcodec/proresdec2.c
> +++ b/libavcodec/proresdec2.c
> @@ -750,6 +750,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
> buf += frame_hdr_size;
> buf_size -= frame_hdr_size;
>
> + /* align height to 16, to avoid segfault */
> + tframe.f->height = FFALIGN(avctx->height, 16);
> + tframe.f->width = FFALIGN(avctx->width, 16);
> + tframe.f->crop_bottom = tframe.f->height - avctx->height;
> +
> if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
> return ret;
Why is this now needed but was not before ?
Is avcodec_align_dimensions2() correct ?
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20181126/332a5e48/attachment.sig>
More information about the ffmpeg-devel
mailing list