Skip to content

Commit 67eb60a

Browse files
committed
Merge remote-tracking branch 'mikrosimage/release/v0.5.6' into develop
2 parents 7f7147b + 6323892 commit 67eb60a

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/AvTranscoder/mediaProperty/FileProperties.cpp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,36 @@ void FileProperties::extractStreamProperties( IProgress& progress, const EAnalys
4141
{
4242
VideoProperties properties( *_formatContext, streamIndex, progress, level );
4343
_videoStreams.push_back( properties );
44-
_streams.push_back( &_videoStreams.back() );
4544
break;
4645
}
4746
case AVMEDIA_TYPE_AUDIO:
4847
{
4948
AudioProperties properties( *_formatContext, streamIndex );
5049
_audioStreams.push_back( properties );
51-
_streams.push_back( &_audioStreams.back() );
5250
break;
5351
}
5452
case AVMEDIA_TYPE_DATA:
5553
{
5654
DataProperties properties( *_formatContext, streamIndex );
5755
_dataStreams.push_back( properties );
58-
_streams.push_back( &_dataStreams.back() );
5956
break;
6057
}
6158
case AVMEDIA_TYPE_SUBTITLE:
6259
{
6360
SubtitleProperties properties( *_formatContext, streamIndex );
6461
_subtitleStreams.push_back( properties );
65-
_streams.push_back( &_subtitleStreams.back() );
6662
break;
6763
}
6864
case AVMEDIA_TYPE_ATTACHMENT:
6965
{
7066
AttachementProperties properties( *_formatContext, streamIndex );
7167
_attachementStreams.push_back( properties );
72-
_streams.push_back( &_attachementStreams.back() );
7368
break;
7469
}
7570
case AVMEDIA_TYPE_UNKNOWN:
7671
{
7772
UnknownProperties properties( *_formatContext, streamIndex );
7873
_unknownStreams.push_back( properties );
79-
_streams.push_back( &_unknownStreams.back() );
8074
break;
8175
}
8276
case AVMEDIA_TYPE_NB:
@@ -86,6 +80,25 @@ void FileProperties::extractStreamProperties( IProgress& progress, const EAnalys
8680
}
8781
}
8882

83+
// once the streams vectors are filled, add their references the base streams vector
84+
for( size_t streamIndex = 0; streamIndex < _videoStreams.size(); ++streamIndex )
85+
_streams.push_back( &_videoStreams.at( streamIndex ) );
86+
87+
for( size_t streamIndex = 0; streamIndex < _audioStreams.size(); ++ streamIndex )
88+
_streams.push_back( &_audioStreams.at(streamIndex) );
89+
90+
for( size_t streamIndex = 0; streamIndex < _dataStreams.size(); ++ streamIndex )
91+
_streams.push_back( &_dataStreams.at(streamIndex) );
92+
93+
for( size_t streamIndex = 0; streamIndex < _subtitleStreams.size(); ++ streamIndex )
94+
_streams.push_back( &_subtitleStreams.at(streamIndex) );
95+
96+
for( size_t streamIndex = 0; streamIndex < _attachementStreams.size(); ++ streamIndex )
97+
_streams.push_back( &_attachementStreams.at(streamIndex) );
98+
99+
for( size_t streamIndex = 0; streamIndex < _unknownStreams.size(); ++ streamIndex )
100+
_streams.push_back( &_unknownStreams.at(streamIndex) );
101+
89102
// if the analysis level has decoded some streams parts, return at the beginning
90103
if( level > eAnalyseLevelHeader )
91104
const_cast<FormatContext*>( _formatContext )->seek( 0, AVSEEK_FLAG_BACKWARD );

0 commit comments

Comments
 (0)