OSDN Git Service

Dont crash if resampling is requested but no audio packets are ever processed.
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 7 Jan 2008 20:42:45 +0000 (20:42 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 7 Jan 2008 20:42:45 +0000 (20:42 +0000)
Originally committed as revision 11449 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index 6c22053..12db8a8 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2057,7 +2057,7 @@ static int av_encode(AVFormatContext **output_files,
                 av_free(ost->pict_tmp.data[0]);
                 if (ost->video_resample)
                     sws_freeContext(ost->img_resample_ctx);
-                if (ost->audio_resample)
+                if (ost->resample)
                     audio_resample_close(ost->resample);
                 av_free(ost);
             }