that was my effort, because it didn't work too. On Tue, Apr 30, 2019 at 7:24 PM Carl Eugen Hoyos <ceffm...@gmail.com> wrote:
> 2019-04-30 13:34 GMT+02:00, hamidi <ham...@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@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/libav-user > > To unsubscribe, visit link above, or email > libav-user-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".