[FFmpeg-devel] who should set framesize?

Luca Abeni lucabe72
Wed Jun 24 16:55:07 CEST 2009

Ronald S. Bultje wrote:
> Hi,
> ffplay rtsp://qtss1.bgsu.edu/wfal08.sdp fails:
> [rtsp @ 0x1032600]Could not find codec parameters (Audio: aac, 22050
> Hz, 2 channels, s16)
> rtsp://qtss1.bgsu.edu/wfal08.sdp: could not find codec parameters
> because AVCodecContext->frame_size is 0. Who should set it? Demuxer? how/where?

AFAIK, for RTP the frame size is set by the decoder, not by the demuxer.
(This is generally done by using information coded in the extradata, and
the demuxer is in charge of properly filling the extradata (it should be
encoded in a "a=" line in the SDP).

Anyway, the doxy comment in avcodec.h is pretty clear about it :)
     /* The following data should not be initialized. */
      * Samples per packet, initialized when calling 'init'.
     int frame_size;


More information about the ffmpeg-devel mailing list