[FFmpeg-cvslog] avfilter/vf_shuffleframes: Assert that the case of an uninitialized ret does not occur
Michael Niedermayer
git at videolan.org
Tue Dec 1 22:12:05 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Dec 1 19:11:44 2015 +0100| [736e2e2c30088d0c2a428a51372c78a0bfb7f356] | committer: Michael Niedermayer
avfilter/vf_shuffleframes: Assert that the case of an uninitialized ret does not occur
Fixes CID1258479
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=736e2e2c30088d0c2a428a51372c78a0bfb7f356
---
libavfilter/vf_shuffleframes.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c
index 041429f..f49c9c6 100644
--- a/libavfilter/vf_shuffleframes.c
+++ b/libavfilter/vf_shuffleframes.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
@@ -90,9 +91,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
s->pts[s->in_frames] = frame->pts;
s->in_frames++;
ret = 0;
- }
-
- if (s->in_frames == s->nb_frames) {
+ } else if (s->in_frames == s->nb_frames) {
int n, x;
for (n = 0; n < s->nb_frames; n++) {
@@ -109,7 +108,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
for (n = 0; n < s->nb_frames; n++)
av_frame_free(&s->frames[n]);
- }
+ } else
+ av_assert0(0);
return ret;
}
More information about the ffmpeg-cvslog
mailing list