]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.c
ffmpeg: fix codecids with ffserver + ffmpeg + ffm
[ffmpeg] / ffmpeg.c
index be98aff57a75a9641b3c773658663e5d97c03eef..9154f3cb4adb26176ef654898f90220821ccd094 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1918,7 +1918,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
 
 #if CONFIG_AVFILTER
         if (ost->input_video_filter) {
-            frame_available = avfilter_poll_frame(ost->output_video_filter->inputs[0]);
+            frame_available = av_buffersink_poll_frame(ost->output_video_filter);
         }
         while (frame_available) {
             if (ost->output_video_filter) {
@@ -1951,7 +1951,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
                 do_video_stats(output_files[ost->file_index].ctx, ost, frame_size);
 #if CONFIG_AVFILTER
             cont:
-            frame_available = ost->output_video_filter && avfilter_poll_frame(ost->output_video_filter->inputs[0]);
+            frame_available = ost->output_video_filter && av_buffersink_poll_frame(ost->output_video_filter);
             avfilter_unref_buffer(ost->picref);
         }
 #endif
@@ -3395,7 +3395,10 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena
     ic->interrupt_callback = int_cb;
 
     if (loop_input) {
-        av_log(NULL, AV_LOG_WARNING, "-loop_input is deprecated, use -loop 1\n");
+        av_log(NULL, AV_LOG_WARNING,
+            "-loop_input is deprecated, use -loop 1\n"
+            "Note, both loop options only work with -f image2\n"
+        );
         ic->loop_input = loop_input;
     }
 
@@ -3959,6 +3962,7 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch
         ost   = new_output_stream(o, s, codec->type);
         st    = ost->st;
         avctx = st->codec;
+        ost->enc = codec;
 
         // FIXME: a more elegant solution is needed
         memcpy(st, ic->streams[i], sizeof(AVStream));
@@ -4159,7 +4163,7 @@ static void opt_output_file(void *optctx, const char *filename)
     }
 
     if (!(oc->oformat->flags & AVFMT_NOFILE)) {
-        /* test if it already exists to avoid loosing precious files */
+        /* test if it already exists to avoid losing precious files */
         assert_file_overwrite(filename);
 
         /* open the file */