Commit 0ebf4754 authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

lavf: add av_ prefix to dump_format()

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a5)
parent 09e22efc
...@@ -1993,7 +1993,7 @@ static int transcode(AVFormatContext **output_files, ...@@ -1993,7 +1993,7 @@ static int transcode(AVFormatContext **output_files,
for(i=0;i<nb_output_files;i++) { for(i=0;i<nb_output_files;i++) {
os = output_files[i]; os = output_files[i];
if (!os->nb_streams && !(os->oformat->flags & AVFMT_NOSTREAMS)) { if (!os->nb_streams && !(os->oformat->flags & AVFMT_NOSTREAMS)) {
dump_format(output_files[i], i, output_files[i]->filename, 1); av_dump_format(output_files[i], i, output_files[i]->filename, 1);
fprintf(stderr, "Output file #%d does not contain any stream\n", i); fprintf(stderr, "Output file #%d does not contain any stream\n", i);
ret = AVERROR(EINVAL); ret = AVERROR(EINVAL);
goto fail; goto fail;
...@@ -2044,7 +2044,7 @@ static int transcode(AVFormatContext **output_files, ...@@ -2044,7 +2044,7 @@ static int transcode(AVFormatContext **output_files,
/* Sanity check that the stream types match */ /* Sanity check that the stream types match */
if (ist_table[ost->source_index]->st->codec->codec_type != ost->st->codec->codec_type) { if (ist_table[ost->source_index]->st->codec->codec_type != ost->st->codec->codec_type) {
int i= ost->file_index; int i= ost->file_index;
dump_format(output_files[i], i, output_files[i]->filename, 1); av_dump_format(output_files[i], i, output_files[i]->filename, 1);
fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n", fprintf(stderr, "Codec type mismatch for mapping #%d.%d -> #%d.%d\n",
stream_maps[n].file_index, stream_maps[n].stream_index, stream_maps[n].file_index, stream_maps[n].stream_index,
ost->file_index, ost->index); ost->file_index, ost->index);
...@@ -2095,7 +2095,7 @@ static int transcode(AVFormatContext **output_files, ...@@ -2095,7 +2095,7 @@ static int transcode(AVFormatContext **output_files,
} }
if (!found) { if (!found) {
int i= ost->file_index; int i= ost->file_index;
dump_format(output_files[i], i, output_files[i]->filename, 1); av_dump_format(output_files[i], i, output_files[i]->filename, 1);
fprintf(stderr, "Could not find input stream matching output stream #%d.%d\n", fprintf(stderr, "Could not find input stream matching output stream #%d.%d\n",
ost->file_index, ost->index); ost->file_index, ost->index);
ffmpeg_exit(1); ffmpeg_exit(1);
...@@ -2474,7 +2474,7 @@ static int transcode(AVFormatContext **output_files, ...@@ -2474,7 +2474,7 @@ static int transcode(AVFormatContext **output_files,
/* dump the file output parameters - cannot be done before in case /* dump the file output parameters - cannot be done before in case
of stream copy */ of stream copy */
for(i=0;i<nb_output_files;i++) { for(i=0;i<nb_output_files;i++) {
dump_format(output_files[i], i, output_files[i]->filename, 1); av_dump_format(output_files[i], i, output_files[i]->filename, 1);
} }
/* dump the stream mapping */ /* dump the stream mapping */
...@@ -3324,7 +3324,7 @@ static void opt_input_file(const char *filename) ...@@ -3324,7 +3324,7 @@ static void opt_input_file(const char *filename)
input_files_ts_offset[nb_input_files] = input_ts_offset - (copy_ts ? 0 : timestamp); input_files_ts_offset[nb_input_files] = input_ts_offset - (copy_ts ? 0 : timestamp);
/* dump the file content */ /* dump the file content */
if (verbose >= 0) if (verbose >= 0)
dump_format(ic, nb_input_files, filename, 0); av_dump_format(ic, nb_input_files, filename, 0);
nb_input_files++; nb_input_files++;
......
...@@ -2468,7 +2468,7 @@ static int decode_thread(void *arg) ...@@ -2468,7 +2468,7 @@ static int decode_thread(void *arg)
st_index[AVMEDIA_TYPE_VIDEO]), st_index[AVMEDIA_TYPE_VIDEO]),
NULL, 0); NULL, 0);
if (show_status) { if (show_status) {
dump_format(ic, 0, is->filename, 0); av_dump_format(ic, 0, is->filename, 0);
} }
/* open the streams */ /* open the streams */
......
...@@ -277,7 +277,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename) ...@@ -277,7 +277,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
return err; return err;
} }
dump_format(fmt_ctx, 0, filename, 0); av_dump_format(fmt_ctx, 0, filename, 0);
/* bind a decoder to each input stream */ /* bind a decoder to each input stream */
for (i = 0; i < fmt_ctx->nb_streams; i++) { for (i = 0; i < fmt_ctx->nb_streams; i++) {
......
...@@ -1450,10 +1450,17 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out, ...@@ -1450,10 +1450,17 @@ int av_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
*/ */
int av_write_trailer(AVFormatContext *s); int av_write_trailer(AVFormatContext *s);
void dump_format(AVFormatContext *ic, #if FF_API_DUMP_FORMAT
int index, attribute_deprecated void dump_format(AVFormatContext *ic,
const char *url, int index,
int is_output); const char *url,
int is_output);
#endif
void av_dump_format(AVFormatContext *ic,
int index,
const char *url,
int is_output);
#if FF_API_PARSE_FRAME_PARAM #if FF_API_PARSE_FRAME_PARAM
/** /**
......
...@@ -57,7 +57,7 @@ fail: ...@@ -57,7 +57,7 @@ fail:
av_log(s, AV_LOG_WARNING, av_log(s, AV_LOG_WARNING,
"Unable to initialize hinting of stream %d\n", src_index); "Unable to initialize hinting of stream %d\n", src_index);
av_freep(&track->enc); av_freep(&track->enc);
/* Set a default timescale, to avoid crashes in dump_format */ /* Set a default timescale, to avoid crashes in av_dump_format */
track->timescale = 90000; track->timescale = 90000;
return ret; return ret;
} }
......
...@@ -481,7 +481,7 @@ int main(int argc, char **argv) ...@@ -481,7 +481,7 @@ int main(int argc, char **argv)
exit(1); exit(1);
} }
dump_format(oc, 0, filename, 1); av_dump_format(oc, 0, filename, 1);
/* now that all the parameters are set, we can open the audio and /* now that all the parameters are set, we can open the audio and
video codecs and allocate the necessary encode buffers */ video codecs and allocate the necessary encode buffers */
......
...@@ -3261,10 +3261,20 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out ...@@ -3261,10 +3261,20 @@ static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_out
dump_metadata(NULL, st->metadata, " "); dump_metadata(NULL, st->metadata, " ");
} }
#if FF_API_DUMP_FORMAT
void dump_format(AVFormatContext *ic, void dump_format(AVFormatContext *ic,
int index, int index,
const char *url, const char *url,
int is_output) int is_output)
{
av_dump_format(ic, index, url, is_output);
}
#endif
void av_dump_format(AVFormatContext *ic,
int index,
const char *url,
int is_output)
{ {
int i; int i;
uint8_t *printed = av_mallocz(ic->nb_streams); uint8_t *printed = av_mallocz(ic->nb_streams);
......
...@@ -92,5 +92,8 @@ ...@@ -92,5 +92,8 @@
#ifndef FF_API_INDEX_BUILT #ifndef FF_API_INDEX_BUILT
#define FF_API_INDEX_BUILT (LIBAVFORMAT_VERSION_MAJOR < 53) #define FF_API_INDEX_BUILT (LIBAVFORMAT_VERSION_MAJOR < 53)
#endif #endif
#ifndef FF_API_DUMP_FORMAT
#define FF_API_DUMP_FORMAT (LIBAVFORMAT_VERSION_MAJOR < 54)
#endif
#endif //AVFORMAT_VERSION_H #endif //AVFORMAT_VERSION_H
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