Why AVCodecContext extradata is NULL?
问题 I am trying to decode h264 video using ffmpeg and stagefright library. I'm using this example. The example shows how to decode mp4 files, but i want to decode only h264 video. Here is piece of my code.. AVFormatSource::AVFormatSource(const char *videoPath) { av_register_all(); mDataSource = avformat_alloc_context(); avformat_open_input(&mDataSource, videoPath, NULL, NULL); for (int i = 0; i < mDataSource->nb_streams; i++) { if (mDataSource->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)