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 @@ -79,7 +79,7 @@ class AvExport StreamTranscoder
79
79
ITransform& getTransform () const { return *_transform; }
80
80
81
81
// / Returns a reference to the stream which unwraps data
82
- IInputStream& getInputStream () const { return * _inputStream; }
82
+ IInputStream* getInputStream () const { return _inputStream; }
83
83
// / Returns a reference to the stream which wraps data
84
84
IOutputStream& getOutputStream () const { return *_outputStream; }
85
85
Original file line number Diff line number Diff line change @@ -522,7 +522,12 @@ void Transcoder::fillProcessStat( ProcessStat& processStat )
522
522
for ( size_t streamIndex = 0 ; streamIndex < _streamTranscoders.size (); ++streamIndex )
523
523
{
524
524
IOutputStream& stream = _streamTranscoders.at ( streamIndex )->getOutputStream ();
525
- const AVMediaType mediaType = _streamTranscoders.at ( streamIndex )->getInputStream ().getProperties ().getStreamType ();
525
+ const IInputStream* inputStream = _streamTranscoders.at ( streamIndex )->getInputStream ();
526
+ if (inputStream == NULL ) {
527
+ LOG_WARN ( " Cannot process statistics of generated stream." )
528
+ continue ;
529
+ }
530
+ const AVMediaType mediaType = inputStream->getProperties ().getStreamType ();
526
531
switch ( mediaType )
527
532
{
528
533
case AVMEDIA_TYPE_VIDEO:
You can’t perform that action at this time.
0 commit comments