Commit ca2b7794 authored by James Almer's avatar James Almer

avformat: remove use of deprecated AVFMT_FLAG_KEEP_SIDE_DATA flag

It has no effect whatsoever since the major bump.
Replace the flag's documentation to reflect this as well.
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 8b43039f
...@@ -991,7 +991,6 @@ static int open_input_file(OptionsContext *o, const char *filename) ...@@ -991,7 +991,6 @@ static int open_input_file(OptionsContext *o, const char *filename)
print_error(filename, AVERROR(ENOMEM)); print_error(filename, AVERROR(ENOMEM));
exit_program(1); exit_program(1);
} }
ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
if (o->nb_audio_sample_rate) { if (o->nb_audio_sample_rate) {
av_dict_set_int(&o->g->format_opts, "sample_rate", o->audio_sample_rate[o->nb_audio_sample_rate - 1].u.i, 0); av_dict_set_int(&o->g->format_opts, "sample_rate", o->audio_sample_rate[o->nb_audio_sample_rate - 1].u.i, 0);
} }
...@@ -1989,7 +1988,6 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch ...@@ -1989,7 +1988,6 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch
int i, err; int i, err;
AVFormatContext *ic = avformat_alloc_context(); AVFormatContext *ic = avformat_alloc_context();
ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
ic->interrupt_callback = int_cb; ic->interrupt_callback = int_cb;
err = avformat_open_input(&ic, filename, NULL, NULL); err = avformat_open_input(&ic, filename, NULL, NULL);
if (err < 0) if (err < 0)
......
...@@ -2828,8 +2828,6 @@ static int open_input_file(InputFile *ifile, const char *filename) ...@@ -2828,8 +2828,6 @@ static int open_input_file(InputFile *ifile, const char *filename)
exit_program(1); exit_program(1);
} }
fmt_ctx->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) { if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE); av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);
scan_all_pmts_set = 1; scan_all_pmts_set = 1;
......
...@@ -1444,7 +1444,7 @@ typedef struct AVFormatContext { ...@@ -1444,7 +1444,7 @@ typedef struct AVFormatContext {
#define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down) #define AVFMT_FLAG_SORT_DTS 0x10000 ///< try to interleave outputted packets by dts (using this flag can slow demuxing down)
#define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted) #define AVFMT_FLAG_PRIV_OPT 0x20000 ///< Enable use of private options by delaying codec open (this could be made default once all code is converted)
#if FF_API_LAVF_KEEPSIDE_FLAG #if FF_API_LAVF_KEEPSIDE_FLAG
#define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Don't merge side data but keep it separate. Deprecated, will be the default. #define AVFMT_FLAG_KEEP_SIDE_DATA 0x40000 ///< Deprecated, does nothing.
#endif #endif
#define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats #define AVFMT_FLAG_FAST_SEEK 0x80000 ///< Enable fast, but inaccurate seeks for some formats
#define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops. #define AVFMT_FLAG_SHORTEST 0x100000 ///< Stop muxing when the shortest stream stops.
......
...@@ -49,7 +49,7 @@ static const AVOption avformat_options[] = { ...@@ -49,7 +49,7 @@ static const AVOption avformat_options[] = {
{"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"}, {"discardcorrupt", "discard corrupted frames", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_DISCARD_CORRUPT }, INT_MIN, INT_MAX, D, "fflags"},
{"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"}, {"sortdts", "try to interleave outputted packets by dts", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_SORT_DTS }, INT_MIN, INT_MAX, D, "fflags"},
#if FF_API_LAVF_KEEPSIDE_FLAG #if FF_API_LAVF_KEEPSIDE_FLAG
{"keepside", "don't merge side data", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"}, {"keepside", "deprecated, does nothing", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_KEEP_SIDE_DATA }, INT_MIN, INT_MAX, D, "fflags"},
#endif #endif
{"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"}, {"fastseek", "fast but inaccurate seeks", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_FAST_SEEK }, INT_MIN, INT_MAX, D, "fflags"},
{"latm", "enable RTP MP4A-LATM payload", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"}, {"latm", "enable RTP MP4A-LATM payload", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_FLAG_MP4A_LATM }, INT_MIN, INT_MAX, E, "fflags"},
......
...@@ -67,8 +67,6 @@ int main(int argc, char **argv) ...@@ -67,8 +67,6 @@ int main(int argc, char **argv)
int frame_count = 1; int frame_count = 1;
int duration = 4; int duration = 4;
ic->flags |= AVFMT_FLAG_KEEP_SIDE_DATA;
for(i=2; i<argc; i+=2){ for(i=2; i<argc; i+=2){
if (!strcmp(argv[i], "-seekforw")){ if (!strcmp(argv[i], "-seekforw")){
seekfirst = atoi(argv[i+1]); seekfirst = atoi(argv[i+1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment