OSDN Git Service

aac: Only output configure if audio was found.
[coroid/libav_saccubus.git] / ffmpeg.c
index 776cfab..c4ac3f9 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -683,7 +683,7 @@ static OutputStream *new_output_stream(AVFormatContext *oc, int file_idx, AVCode
     ost->st    = st;
     ost->enc   = codec;
     if (codec)
-        ost->opts  = filter_codec_opts(codec_opts, codec->id, 1);
+        ost->opts  = filter_codec_opts(codec_opts, codec->id, oc, st);
 
     avcodec_get_context_defaults3(st->codec, codec);
 
@@ -691,11 +691,10 @@ static OutputStream *new_output_stream(AVFormatContext *oc, int file_idx, AVCode
     return ost;
 }
 
-static int read_ffserver_streams(AVFormatContext *s, const char *filename)
+static int read_avserver_streams(AVFormatContext *s, const char *filename)
 {
     int i, err;
     AVFormatContext *ic = NULL;
-    int nopts = 0;
 
     err = avformat_open_input(&ic, filename, NULL, NULL);
     if (err < 0)
@@ -726,9 +725,6 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
             } else
                 choose_pixel_fmt(st, codec);
         }
-
-        if(st->codec->flags & CODEC_FLAG_BITEXACT)
-            nopts = 1;
     }
 
     av_close_input_file(ic);
@@ -2391,8 +2387,6 @@ static int transcode(AVFormatContext **output_files,
             }
             assert_codec_experimental(ist->st->codec, 0);
             assert_avoptions(ost->opts);
-            //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
-            //    ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
         }
     }
 
@@ -3252,7 +3246,7 @@ static int opt_input_file(const char *opt, const char *filename)
     }
 
     /* Set AVCodecContext options for avformat_find_stream_info */
-    opts = setup_find_stream_info_opts(ic);
+    opts = setup_find_stream_info_opts(ic, codec_opts);
     orig_nb_streams = ic->nb_streams;
 
     /* If not enough info to get the stream parameters, we decode the
@@ -3293,7 +3287,7 @@ static int opt_input_file(const char *opt, const char *filename)
         ist->st = st;
         ist->file_index = nb_input_files;
         ist->discard = 1;
-        ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, 0);
+        ist->opts = filter_codec_opts(codec_opts, ist->st->codec->codec_id, ic, st);
 
         if (i < nb_ts_scale)
             ist->ts_scale = ts_scale[i];
@@ -3766,9 +3760,9 @@ static void opt_output_file(const char *filename)
 
     if (!strcmp(file_oformat->name, "ffm") &&
         av_strstart(filename, "http:", NULL)) {
-        /* special case for files sent to ffserver: we get the stream
-           parameters from ffserver */
-        int err = read_ffserver_streams(oc, filename);
+        /* special case for files sent to avserver: we get the stream
+           parameters from avserver */
+        int err = read_avserver_streams(oc, filename);
         if (err < 0) {
             print_error(filename, err);
             ffmpeg_exit(1);
@@ -4394,6 +4388,10 @@ int main(int argc, char **argv)
 
     show_banner();
 
+    av_log(NULL, AV_LOG_WARNING, "This program is not developed anymore and is only "
+                                 "provided for compatibility. Use avconv instead "
+                                 "(see Changelog for the list of incompatible changes).\n");
+
     /* parse options */
     parse_options(argc, argv, options, opt_output_file);