History

avformat/format: make experimental flag works for muxer

Zhao Zhili committed 1 year ago

Commit a5dc56f1 parent 153cdf32 files · +3 −2Browse files

Showing the changes to libavformat (2 of 2 files). Show all

Unified · Split

2 files
  1. libavformat/avformat.h +1 −2
  2. libavformat/format.c +2 −0
libavformat/avformat.h+1−2
@@ -470,8 +470,7 @@ typedef struct AVProbeData { · 469 unmodified lines
470/**470/**
471 * The muxer/demuxer is experimental and should be used with caution.471 * The muxer/demuxer is experimental and should be used with caution.
472 *472 *
473 * - demuxers: will not be selected automatically by probing, must be specified473 * It will not be selected automatically, and must be specified explicitly.
474 * explicitly.
475 */474 */
476#define AVFMT_EXPERIMENTAL 0x0004475#define AVFMT_EXPERIMENTAL 0x0004
477#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */476#define AVFMT_SHOW_IDS 0x0008 /**< Show format stream IDs numbers. */
libavformat/format.c+2−0
@@ -95,6 +95,8 @@ const AVOutputFormat *av_guess_format(const char *short_name, const char *filena · 94 unmodified lines
95 /* Find the proper file type. */95 /* Find the proper file type. */
96 score_max = 0;96 score_max = 0;
97 while ((fmt = av_muxer_iterate(&i))) {97 while ((fmt = av_muxer_iterate(&i))) {
98 if (fmt->flags & AVFMT_EXPERIMENTAL && !short_name)
99 continue;
98 score = 0;100 score = 0;
99 if (fmt->name && short_name && av_match_name(short_name, fmt->name))101 if (fmt->name && short_name && av_match_name(short_name, fmt->name))
100 score += 100;102 score += 100;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t