It more properly belongs to output, not input.
---
 avconv.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/avconv.c b/avconv.c
index c0e85e3..937f91e 100644
--- a/avconv.c
+++ b/avconv.c
@@ -165,7 +165,6 @@ typedef struct InputStream {
     int decoding_needed;     /* true if the packets must be decoded in 
'raw_fifo' */
     AVCodec *dec;
     AVFrame *decoded_frame;
-    AVFrame *filtered_frame;
 
     int64_t       start;     /* time when read started */
     /* predicted dts of the next packet read for this stream or (when there are
@@ -217,6 +216,7 @@ typedef struct OutputStream {
     AVCodec *enc;
     int64_t max_frames;
     AVFrame *output_frame;
+    AVFrame *filtered_frame;
 
     /* video only */
     AVRational frame_rate;
@@ -700,13 +700,13 @@ void exit_program(int ret)
         }
 
         av_freep(&output_streams[i].avfilter);
+        av_freep(&output_streams[i].filtered_frame);
     }
     for (i = 0; i < nb_input_files; i++) {
         avformat_close_input(&input_files[i].ctx);
     }
     for (i = 0; i < nb_input_streams; i++) {
         av_freep(&input_streams[i].decoded_frame);
-        av_freep(&input_streams[i].filtered_frame);
         av_dict_free(&input_streams[i].opts);
         free_buffer_pool(&input_streams[i]);
     }
@@ -1949,12 +1949,12 @@ static int transcode_video(InputStream *ist, AVPacket 
*pkt, int *got_output, int
             av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame,
                                      decoded_frame->pts, 
decoded_frame->sample_aspect_ratio);
 
-        if (!ist->filtered_frame && !(ist->filtered_frame = 
avcodec_alloc_frame())) {
+        if (!ost->filtered_frame && !(ost->filtered_frame = 
avcodec_alloc_frame())) {
             ret = AVERROR(ENOMEM);
             goto fail;
         } else
-            avcodec_get_frame_defaults(ist->filtered_frame);
-        filtered_frame = ist->filtered_frame;
+            avcodec_get_frame_defaults(ost->filtered_frame);
+        filtered_frame = ost->filtered_frame;
 
         frame_available = 
avfilter_poll_frame(ost->output_video_filter->inputs[0]);
         while (frame_available) {
-- 
1.7.9.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to