diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 17:35:56 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-07 17:35:56 +0000 |
commit | 1dbba251922baea90369abe9fdf239e693afb813 (patch) | |
tree | d6b4fd951ac3893b0149956d12b4c9afa2c01468 /media/base/mock_ffmpeg.cc | |
parent | 8931c41ae5392aab1c70f9c9b4e4c64061fdd9af (diff) | |
download | chromium_src-1dbba251922baea90369abe9fdf239e693afb813.zip chromium_src-1dbba251922baea90369abe9fdf239e693afb813.tar.gz chromium_src-1dbba251922baea90369abe9fdf239e693afb813.tar.bz2 |
Cleanup resources allocated by FFmpeg to avoid memory and threads leaks
Calls avcodec_free and avcodec_thread_free appropriately.
Review URL: http://codereview.chromium.org/151192
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/mock_ffmpeg.cc')
-rw-r--r-- | media/base/mock_ffmpeg.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/media/base/mock_ffmpeg.cc b/media/base/mock_ffmpeg.cc index 8a397de..054f996 100644 --- a/media/base/mock_ffmpeg.cc +++ b/media/base/mock_ffmpeg.cc @@ -57,6 +57,10 @@ int avcodec_open(AVCodecContext* avctx, AVCodec* codec) { return media::MockFFmpeg::get()->AVCodecOpen(avctx, codec); } +int avcodec_close(AVCodecContext* avctx) { + return media::MockFFmpeg::get()->AVCodecClose(avctx); +} + int avcodec_thread_init(AVCodecContext* avctx, int threads) { return media::MockFFmpeg::get()->AVCodecThreadInit(avctx, threads); } @@ -83,6 +87,10 @@ int av_open_input_file(AVFormatContext** format, const char* filename, parameters); } +void av_close_input_file(AVFormatContext* format) { + media::MockFFmpeg::get()->AVCloseInputFile(format); +} + int av_find_stream_info(AVFormatContext* format) { return media::MockFFmpeg::get()->AVFindStreamInfo(format); } |