// Returns nullptr if no frame was decoded (e.g. EOF).
AVFrameWithDeleter decode_frame(AVFormatContext *format_ctx, AVCodecContext *video_codec_ctx, AVCodecContext *audio_codec_ctx,
const std::string &pathname, int video_stream_index, int audio_stream_index,
// Returns nullptr if no frame was decoded (e.g. EOF).
AVFrameWithDeleter decode_frame(AVFormatContext *format_ctx, AVCodecContext *video_codec_ctx, AVCodecContext *audio_codec_ctx,
const std::string &pathname, int video_stream_index, int audio_stream_index,