Index: ppapi/cpp/dev/video_decoder_dev.cc |
diff --git a/ppapi/cpp/dev/video_decoder_dev.cc b/ppapi/cpp/dev/video_decoder_dev.cc |
index 89fe6aead54aa527c78d3eff71328bc83c6e6795..2ef19fcc1ab630fd66cff485750c533ccfda53d7 100644 |
--- a/ppapi/cpp/dev/video_decoder_dev.cc |
+++ b/ppapi/cpp/dev/video_decoder_dev.cc |
@@ -32,7 +32,10 @@ VideoDecoder_Dev::VideoDecoder_Dev(const Instance& instance) { |
VideoDecoder_Dev::VideoDecoder_Dev(PP_Resource resource) : Resource(resource) { |
} |
-VideoDecoder_Dev::~VideoDecoder_Dev() {} |
+VideoDecoder_Dev::~VideoDecoder_Dev() { |
+ get_interface<PPB_VideoDecoder_Dev>()->Destroy(pp_resource()); |
+} |
+ |
int32_t VideoDecoder_Dev::Initialize(const PP_VideoConfigElement* config, |
const Context3D_Dev& context, |
@@ -82,11 +85,4 @@ int32_t VideoDecoder_Dev::Reset(CompletionCallback callback) { |
pp_resource(), callback.pp_completion_callback()); |
} |
-int32_t VideoDecoder_Dev::Destroy(CompletionCallback callback) { |
- if (!has_interface<PPB_VideoDecoder_Dev>()) |
- return callback.MayForce(PP_ERROR_NOINTERFACE); |
- return get_interface<PPB_VideoDecoder_Dev>()->Destroy( |
- pp_resource(), callback.pp_completion_callback()); |
-} |
- |
} // namespace pp |