On Thu, 19 Jun 2014 17:48:47 +1000 YIRAN LI <[email protected]> wrote:
> Hi, I met a crash when using sws_scale. So I'd like to see if anyone can > help me here. > > The input is a 1754x789 RGB24 image and I want to scale to 1280x576 > > swscontext is created successfully. > > I create my own buffer to hold the image data, because it's RGB24 so the > byteswith is 5264 (16 aligned) so the whole buffer is 5264x789. > > The input AVFrame for sws_scale is created using avcode_alloc_frame(), and > data[0] points to the buffer linesize[0] = 5264, and the output AVFrame is > created using avpicture_alloc(rbg24, 1280, 576). Never use anything related to avpicture. Use av_frame_get_buffer(). Strange name, but it allocates image data for the currently set AVFrame size/pixelformat. > > with all above condition, sws_scale crashed. So I'd like to know if there's > any special requirement on the input/out buffer of sws_scale? > > Thanks _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
