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 { |