[FFmpeg-devel,v2,2/4] frame: make av_frame_remove_side_data return early

Submitted by Zhao Zhili on Nov. 1, 2019, 12:03 p.m.

Details

Message ID 20191101120314.88956-2-quinkblack@foxmail.com
State New
Headers show

Commit Message

Zhao Zhili Nov. 1, 2019, 12:03 p.m.
From: Zhao Zhili <zhilizhao@tencent.com>

---
 libavutil/frame.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/libavutil/frame.c b/libavutil/frame.c
index bb20e99331..9edf971c55 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -825,6 +825,7 @@  void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
             free_side_data(&frame->side_data[i]);
             frame->side_data[i] = frame->side_data[frame->nb_side_data - 1];
             frame->nb_side_data--;
+            return;
         }
     }
 }