[Libav-user] 980210 - What is wrong while providing arguments for sws_scale?!

hamidi hamidi at gmail.com
Wed May 1 06:28:08 EEST 2019


that was my effort, because it didn't work too.

On Tue, Apr 30, 2019 at 7:24 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2019-04-30 13:34 GMT+02:00, hamidi <hamidi at gmail.com>:
> > Hi
> > In the following code, I can't figure out what's wrong:
> >
> > uint8_t *dstData[4];
> > int dstLinesize[4];
> > AVPixelFormat convertToPixFmt = AV_PIX_FMT_RGBA;
> > int ret;
> >
> > // ...
> >
> > printf("tmp_frame format: %d (%s) %dx%d\n", tmp_frame->format,
> > av_get_pix_fmt_name((AVPixelFormat)tmp_frame->format), tmp_frame->width,
> > tmp_frame->height);
> > // The above line prints: tmp_frame format: 23 (nv12) 480x480
> >
> > int size = av_image_get_buffer_size(convertToPixFmt, tmp_frame->width,
> > tmp_frame->height, 1);
> > uint8_t *buffer = (uint8_t *) av_malloc(size);
> >
> > ret = av_image_copy_to_buffer(buffer, size,
> > (const uint8_t * const *)&tmp_frame->data[i],
>
> Why are you copying the temporary frame instead
> of passing its pointer to sws_scale()?
>
> Carl Eugen
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190501/e28502b1/attachment.html>


More information about the Libav-user mailing list