avpicture_fill is not filling in the linesize or data as expected. I could > really use some help here. > > See the following: > > AVFrame *output_frame = avcodec_alloc_frame(); > > output_size = avpicture_get_size(AV_PIX_FMT_YUV420P, > 640, > 480); > > uint8_t *output_buffer = (uint8_t*)av_malloc(output_size); > > avpicture_fill((AVPicture*)output_frame, > output_buffer, > AV_PIX_FMT_YUV420P, > 640, > 480); > > ... later ... > > sws_scale(...); > > Outputs: [swscaler @ 0x912dd60] bad dst image pointers > > Thanks for your time! > -Neil > > _______________________________________________ > Libav-user mailing list > [email protected] > http://ffmpeg.org/mailman/listinfo/libav-user > > Hi,
have you tried to call avpicture_alloc(&outPic, m_codecCtxOut->pix_fmt, m_codecCtxOut->width, m_codecCtxOut->height) That should set the data[] and linesize[] fields, and allocate the memory accordingly, afaik. -Bjoern
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
