Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: media/ffmpeg/ffmpeg_common.h

Issue 2804042: Incomplete changes to make scoped_ptr_malloc use plain functions. (Closed)
Patch Set: chrome now builds & links Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gfx/gtk_util.h ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.h
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 10f67d2af69d8dedb192db39e949a976dd61ed90..1283cb481e5028f4860940b537111fc1fd00072d 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -27,25 +27,17 @@ namespace media {
// Wraps FFmpeg's av_free() in a class that can be passed as a template argument
// to scoped_ptr_malloc.
-class ScopedPtrAVFree {
- public:
- inline void operator()(void* x) const {
- av_free(x);
- }
-};
+inline void ScopedPtrAVFree(void* x) {
+ av_free(x);
+}
// This assumes that the AVPacket being captured was allocated outside of
// FFmpeg via the new operator. Do not use this with AVPacket instances that
// are allocated via malloc() or av_malloc().
-class ScopedPtrAVFreePacket {
- public:
- inline void operator()(void* x) const {
- AVPacket* packet = static_cast<AVPacket*>(x);
- av_free_packet(packet);
- delete packet;
- }
-};
-
+inline void ScopedPtrAVFreePacket(AVPacket* packet) {
+ av_free_packet(packet);
+ delete packet;
+}
// FFmpeg MIME types.
namespace mime_type {
« no previous file with comments | « gfx/gtk_util.h ('k') | media/filters/ffmpeg_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698