[FFmpeg-user] get AVPacket type without stream_index
Jake Eastwood
cheloveck2.0 at gmail.com
Fri Jun 17 10:13:46 EEST 2022
The core problem is that sometimes "AVStream" of "AVFormatContext" is not
configurated after "avformat_find_stream_info" called with no error status.
I trying to fix that with calling "av_read_frame"
before "avformat_find_stream_info", and it helps sometimes. But how can I
be sure that "av_read_frame" returns video packet, if I can't get AVStream
with index at this point?
Is it good idea to call "avformat_find_stream_info" several times instead?
For example sometimes I can't get
(AVPixelFormat) fmtc_->streams[video_stream_index_]->codecpar->format
because it has value of AV_PIX_FMT_NONE
More information about the ffmpeg-user
mailing list