Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Curtis <dalecurtis@chromium.org>2013-05-23 02:17:08 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-07-10 20:46:35 +0400
commitd8538a10024cc33075a8d5b121336ed12ba545ad (patch)
treeee580d494015b1e93660c061c71daeb004273d61 /libavformat
parent6cb33e076323c684e91abe71d9b3fabe6830c75d (diff)
avformat/utils: Keep internal and external av_read_frame() packets in sync.
Otherwise, during error conditions, the caller will be left with dangling pointers to a destructed packet => boom. BUG=242786 TEST=ffmpeg_regression_tests Commit slightly simplified by commiter Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c54a1565f512858ccfa70392f40f11c098bc1b63) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ed83f28b0a..4e6e21586d 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1457,6 +1457,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
st->skip_to_keyframe = 0;
if (st->skip_to_keyframe) {
av_free_packet(&cur_pkt);
+ if (got_packet) {
+ *pkt = cur_pkt;
+ }
got_packet = 0;
}
}