summaryrefslogtreecommitdiffstats
path: root/media/ffmpeg/ffmpeg_unittest.cc
diff options
context:
space:
mode:
authorjrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-05 05:39:37 +0000
committerjrummell@chromium.org <jrummell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-05 05:39:37 +0000
commitd51cb43c59b7fc6ee9fc098d9e38bef125c662ae (patch)
treebd3f61a9f361fbc1a99c3ef731f908659a0a970b /media/ffmpeg/ffmpeg_unittest.cc
parentb88881ff65906d78eea1bad728b43bfc7e6e1c92 (diff)
downloadchromium_src-d51cb43c59b7fc6ee9fc098d9e38bef125c662ae.zip
chromium_src-d51cb43c59b7fc6ee9fc098d9e38bef125c662ae.tar.gz
chromium_src-d51cb43c59b7fc6ee9fc098d9e38bef125c662ae.tar.bz2
Call correct method to free up ffmpeg AVFrame objects
When ffmpeg AVFrame objects are freed, the current code calls avcodec_free_frame(). However, this can cause "use after free" errors. The correct call is to call avcodec_free_frame(). Also updating the remaining places that use av_free() to free up an AVFrame to use avcodec_free_frame() instead. Requires a roll of ffmpeg to pick up avcodec_free_frame(). BUG=303927 TEST=No errors reported by ASAN for repro. Review URL: https://codereview.chromium.org/26023006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/ffmpeg/ffmpeg_unittest.cc')
-rw-r--r--media/ffmpeg/ffmpeg_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/ffmpeg/ffmpeg_unittest.cc b/media/ffmpeg/ffmpeg_unittest.cc
index 255d2aa..bd23266 100644
--- a/media/ffmpeg/ffmpeg_unittest.cc
+++ b/media/ffmpeg/ffmpeg_unittest.cc
@@ -382,8 +382,8 @@ class FFmpegTest : public testing::TestWithParam<const char*> {
AVPacketQueue audio_packets_;
AVPacketQueue video_packets_;
- scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> audio_buffer_;
- scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> video_buffer_;
+ scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFreeFrame> audio_buffer_;
+ scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFreeFrame> video_buffer_;
int64 decoded_audio_time_;
int64 decoded_audio_duration_;