[FFmpeg-devel] [PATCH] libavcodec: rawenc: Use the AVCodecContext pix_fmt/width/height
Clément Bœsch
u at pkh.me
Mon Apr 4 16:03:10 CEST 2016
On Mon, Apr 04, 2016 at 03:56:31PM +0200, Hugo Beauzée-Luyssen wrote:
> Instead of using the ones in the AVFrame which can be uninitialized
In what context?
> ---
> libavcodec/rawenc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
> index d837056..27e4a29 100644
> --- a/libavcodec/rawenc.c
> +++ b/libavcodec/rawenc.c
> @@ -60,8 +60,8 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
> return ret;
> if ((ret = av_image_copy_to_buffer(pkt->data, pkt->size,
> (const uint8_t **)frame->data, frame->linesize,
> - frame->format,
> - frame->width, frame->height, 1)) < 0)
> + avctx->pix_fmt,
> + avctx->width, avctx->height, 1)) < 0)
> return ret;
>
> if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 &&
> --
> 2.8.0.rc3
>
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160404/2ab6d4cb/attachment.sig>
More information about the ffmpeg-devel
mailing list