summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-20 12:12:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 12:12:03 +0200
commiteb8756e4b7f9e53044fbe033531c53414669a4e0 (patch)
treef5b95807a385a158939d472281c8e0f9f9d22838 /ffplay.c
parent0796a2ab4ff58d454006403395a4be91c403f161 (diff)
parent336d2f0979b43a39bd11a047d798b7990d8b07c6 (diff)
Merge commit '336d2f0979b43a39bd11a047d798b7990d8b07c6'
* commit '336d2f0979b43a39bd11a047d798b7990d8b07c6': avplay: Free frame and graph when memory allocation fails Conflicts: ffplay.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index adeae505f3..4b97ea39ec 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2231,13 +2231,19 @@ static int video_thread(void *arg)
enum AVPixelFormat last_format = -2;
int last_serial = -1;
int last_vfilter_idx = 0;
- if (!graph)
+ if (!graph) {
+ av_frame_free(&frame);
return AVERROR(ENOMEM);
+ }
#endif
- if (!frame)
+ if (!frame) {
+#if CONFIG_AVFILTER
+ avfilter_graph_free(&graph);
+#endif
return AVERROR(ENOMEM);
+ }
for (;;) {
ret = get_video_frame(is, frame);