[Ffmpeg-devel] I want to resize getted frame from movie file.

Chang Min Jeon jcm1981
Fri Jul 29 15:35:00 CEST 2005


I want to watch fixed display size from movie file. (eg. 640x480)
 I'm trying to use img_resample function.
 I don't know what i do before calling img_resample_init function.
 something following line.
 
if(packet.stream_index == m_nVideoStream)
{
// decoding next frame.
bytesDecoded = avcodec_decode_video(m_pCodecCtx, m_pFrame, &frameFinished, 
packet.data, packet.size);

if(frameFinished)
{
 img_convert((AVPicture *)m_pFrameRGB, PIX_FMT_RGB24, (AVPicture*)m_pFrame,
m_pCodecCtx->pix_fmt, m_pCodecCtx->width, m_pCodecCtx->height); // m_pFrame 
has YUV frame 
 ImgReSampleContext *s;
s = img_resample_init( 640, 480, width, height); // initialize resample
img_resample(s, m_pic, (AVPicture *)m_pFrameRGB); // error occur
 img_resample_close(s);
 Jeon,Chang-Min
 Thanks.




More information about the ffmpeg-devel mailing list