Skip to content

Commit 9cb1b2d

Browse files
author
Clement Champetier
committed
InputFile: refactore analyse
Split properties nstantiation into 2 lines: better for debugging with breakpoint and easier to read.
1 parent 7157c0a commit 9cb1b2d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/AvTranscoder/file/InputFile.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,32 +79,38 @@ InputFile& InputFile::analyse( IProgress& progress, const EAnalyseLevel level )
7979
{
8080
case AVMEDIA_TYPE_VIDEO:
8181
{
82-
_properties.getVideoProperties().push_back( VideoProperties( _formatContext, streamId, progress, level ) );
82+
VideoProperties properties( _formatContext, streamId, progress, level );
83+
_properties.getVideoProperties().push_back( properties );
8384
break;
8485
}
8586
case AVMEDIA_TYPE_AUDIO:
8687
{
87-
_properties.getAudioProperties().push_back( AudioProperties( _formatContext, streamId ) );
88+
AudioProperties properties( _formatContext, streamId );
89+
_properties.getAudioProperties().push_back( properties );
8890
break;
8991
}
9092
case AVMEDIA_TYPE_DATA:
9193
{
92-
_properties.getDataProperties().push_back( DataProperties( _formatContext, streamId ) );
94+
DataProperties properties( _formatContext, streamId );
95+
_properties.getDataProperties().push_back( properties );
9396
break;
9497
}
9598
case AVMEDIA_TYPE_SUBTITLE:
9699
{
97-
_properties.getSubtitleProperties().push_back( SubtitleProperties( _formatContext, streamId ) );
100+
SubtitleProperties properties( _formatContext, streamId );
101+
_properties.getSubtitleProperties().push_back( properties );
98102
break;
99103
}
100104
case AVMEDIA_TYPE_ATTACHMENT:
101105
{
102-
_properties.getAttachementProperties().push_back( AttachementProperties( _formatContext, streamId ) );
106+
AttachementProperties properties( _formatContext, streamId );
107+
_properties.getAttachementProperties().push_back( properties );
103108
break;
104109
}
105110
case AVMEDIA_TYPE_UNKNOWN:
106111
{
107-
_properties.getUnknownPropertiesProperties().push_back( UnknownProperties( _formatContext, streamId ) );
112+
UnknownProperties properties( _formatContext, streamId );
113+
_properties.getUnknownPropertiesProperties().push_back( properties );
108114
break;
109115
}
110116
case AVMEDIA_TYPE_NB:

0 commit comments

Comments
 (0)