Skip to content

Commit d410907

Browse files
varshnieLashminthaJ
authored andcommitted
VPLAY-11143: AAMP mp4Demux Integration
Reason for change:pipeline reconfigure is avoided if stream format is unknown Procedure: As mentioned in the ticket Risks: Low Signed-off-by: varshnie <[email protected]>
1 parent afd0ef0 commit d410907

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

middleware/InterfacePlayerRDK.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,18 @@ void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int auxF
385385
gst_media_stream *stream = &interfacePlayerPriv->gstPrivateContext->stream[i];
386386
if(stream->format != newFormat[i])
387387
{
388-
if (newFormat[i] != GST_FORMAT_INVALID)
388+
bool isInitialSetup = (stream->format == GST_FORMAT_INVALID || stream->format == GST_FORMAT_UNKNOWN);
389+
bool isValidNewFormat = (newFormat[i] != GST_FORMAT_INVALID && newFormat[i] != GST_FORMAT_UNKNOWN);
390+
if (isValidNewFormat || isInitialSetup)
389391
{
390392
MW_LOG_MIL("Closing stream %d old format = %d, new format = %d",i, stream->format, newFormat[i]);
391393
configureStream[i] = true;
392394
interfacePlayerPriv->gstPrivateContext->NumberOfTracks++;
393395
}
396+
else
397+
{
398+
MW_LOG_MIL("Skipping reconfiguration for stream %d - both format invalid/unknown",i);
399+
}
394400
}
395401
if(interfacePlayerPriv->socInterface->ShouldTearDownForTrickplay())
396402
{

0 commit comments

Comments
 (0)