Remove use of vcm->ResetDecoder from modules/utility.

R=asapersson@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2203006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4750 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/utility/source/file_player_impl.cc b/webrtc/modules/utility/source/file_player_impl.cc
index 1a2b674..9240e64 100644
--- a/webrtc/modules/utility/source/file_player_impl.cc
+++ b/webrtc/modules/utility/source/file_player_impl.cc
@@ -457,8 +457,8 @@
 #ifdef WEBRTC_MODULE_UTILITY_VIDEO
 VideoFilePlayerImpl::VideoFilePlayerImpl(uint32_t instanceID,
                                          FileFormats fileFormat)
-    : FilePlayerImpl(instanceID,fileFormat),
-      _videoDecoder(*new VideoCoder(instanceID)),
+    : FilePlayerImpl(instanceID, fileFormat),
+      video_decoder_(new VideoCoder(instanceID)),
       video_codec_info_(),
       _decodedVideoFrames(0),
       _encodedData(*new EncodedVideoData()),
@@ -468,16 +468,15 @@
       _accumulatedRenderTimeMs(0),
       _frameLengthMS(0),
       _numberOfFramesRead(0),
-      _videoOnly(false)
-{
-    memset(&video_codec_info_, 0, sizeof(video_codec_info_));
+      _videoOnly(false) {
+  memset(&video_codec_info_, 0, sizeof(video_codec_info_));
 }
 
 VideoFilePlayerImpl::~VideoFilePlayerImpl()
 {
     delete _critSec;
     delete &_frameScaler;
-    delete &_videoDecoder;
+    video_decoder_.reset();
     delete &_encodedData;
 }
 
@@ -523,7 +522,7 @@
     CriticalSectionScoped lock( _critSec);
 
     _decodedVideoFrames = 0;
-    _videoDecoder.ResetDecoder();
+    video_decoder_.reset(new VideoCoder(_instanceID));
 
     return FilePlayerImpl::StopPlayingFile();
 }
@@ -578,7 +577,7 @@
         // Set the timestamp manually since there is no timestamp in the file.
         // Update timestam according to 90 kHz stream.
         _encodedData.timeStamp += (90000 / video_codec_info_.maxFramerate);
-        retVal = _videoDecoder.Decode(videoFrame, _encodedData);
+        retVal = video_decoder_->Decode(videoFrame, _encodedData);
     }
 
     int64_t renderTimeMs = TickTime::MillisecondTimestamp();
@@ -696,14 +695,13 @@
     }
 
     int32_t useNumberOfCores = 1;
-    if(_videoDecoder.SetDecodeCodec(video_codec_info_, useNumberOfCores) != 0)
-    {
-        WEBRTC_TRACE(
-            kTraceWarning,
-            kTraceVideo,
-            _instanceID,
-            "FilePlayerImpl::SetUpVideoDecoder() codec %s not supported",
-            video_codec_info_.plName);
+    if (video_decoder_->SetDecodeCodec(video_codec_info_, useNumberOfCores) !=
+        0) {
+      WEBRTC_TRACE(kTraceWarning,
+                   kTraceVideo,
+                   _instanceID,
+                   "FilePlayerImpl::SetUpVideoDecoder() codec %s not supported",
+                   video_codec_info_.plName);
         return -1;
     }