File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/AvTranscoder/transcoder Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ class AvExport StreamTranscoder
80
80
ITransform& getTransform () const { return *_transform; }
81
81
82
82
// / Returns a reference to the stream which unwraps data
83
- IInputStream& getInputStream () const { return * _inputStream; }
83
+ IInputStream* getInputStream () const { return _inputStream; }
84
84
// / Returns a reference to the stream which wraps data
85
85
IOutputStream& getOutputStream () const { return *_outputStream; }
86
86
Original file line number Diff line number Diff line change @@ -563,7 +563,12 @@ void Transcoder::fillProcessStat(ProcessStat& processStat)
563
563
for (size_t streamIndex = 0 ; streamIndex < _streamTranscoders.size (); ++streamIndex)
564
564
{
565
565
IOutputStream& stream = _streamTranscoders.at (streamIndex)->getOutputStream ();
566
- const AVMediaType mediaType = _streamTranscoders.at (streamIndex)->getInputStream ().getProperties ().getStreamType ();
566
+ const IInputStream* inputStream = _streamTranscoders.at ( streamIndex )->getInputStream ();
567
+ if (inputStream == NULL ) {
568
+ LOG_WARN ( " Cannot process statistics of generated stream." )
569
+ continue ;
570
+ }
571
+ const AVMediaType mediaType = inputStream->getProperties ().getStreamType ();
567
572
switch (mediaType)
568
573
{
569
574
case AVMEDIA_TYPE_VIDEO:
You can’t perform that action at this time.
0 commit comments