Lines Matching defs:fmt_ctx
38 static AVFormatContext *fmt_ctx = NULL;
149 AVCodecContext **dec_ctx, AVFormatContext *fmt_ctx, enum AVMediaType type)
155 ret = av_find_best_stream(fmt_ctx, type, -1, -1, NULL, 0);
162 st = fmt_ctx->streams[stream_index];
246 if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
252 if (avformat_find_stream_info(fmt_ctx, NULL) < 0) {
257 if (open_codec_context(&video_stream_idx, &video_dec_ctx, fmt_ctx, AVMEDIA_TYPE_VIDEO) >= 0) {
258 video_stream = fmt_ctx->streams[video_stream_idx];
280 if (open_codec_context(&audio_stream_idx, &audio_dec_ctx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
281 audio_stream = fmt_ctx->streams[audio_stream_idx];
291 av_dump_format(fmt_ctx, 0, src_filename, 0);
319 while (av_read_frame(fmt_ctx, pkt) >= 0) {
372 avformat_close_input(&fmt_ctx);