Lines Matching defs:fmt_ctx
28 static AVFormatContext *fmt_ctx = NULL;
77 static int open_codec_context(AVFormatContext *fmt_ctx, enum AVMediaType type)
85 ret = av_find_best_stream(fmt_ctx, type, -1, -1, &dec, 0);
92 st = fmt_ctx->streams[stream_idx];
117 video_stream = fmt_ctx->streams[video_stream_idx];
135 if (avformat_open_input(&fmt_ctx, src_filename, NULL, NULL) < 0) {
140 if (avformat_find_stream_info(fmt_ctx, NULL) < 0) {
145 open_codec_context(fmt_ctx, AVMEDIA_TYPE_VIDEO);
147 av_dump_format(fmt_ctx, 0, src_filename, 0);
172 while (av_read_frame(fmt_ctx, pkt) >= 0) {
185 avformat_close_input(&fmt_ctx);