On Fri, 2009-12-11 at 13:23 +0100, [email protected] wrote: > Hi all, > I'm using latest libavcodec (updated 10 dec. 2009) on iPhone, but I've some > problems using decoder. > > This is code that I use: > ... > > and to decode frames: > > int ret = avcodec_decode_video2(m_c, &m_picture, &m_got_picture, &avpkt); > > > m_picture return not corrects decoded frames. > > I've verified that source frames are corrects, so I think I've miss something > during init procedure. > > Can someone help me. Thanks. > >
Hello It seem you have the pixel formats wrong. You're decoding PIX_FMT_YUVJ420P, which means you have to use libswscale to get PIX_FMT_RGBA data into m_pFrameRGB. Search for sws_getContext in ffmpeg.c and elsewhere. By the way, hard coding the resolution etc. means you will only be able to play certain files, but I assume you know that. /Tomas _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
