Skip to content

Commit adbfd70

Browse files
committed
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 4eb8855 commit adbfd70

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
@@ -383,12 +383,18 @@ void InterfacePlayerRDK::ConfigurePipeline(int format, int audioFormat, int auxF
383383
gst_media_stream *stream = &interfacePlayerPriv->gstPrivateContext->stream[i];
384384
if(stream->format != newFormat[i])
385385
{
386-
if (newFormat[i] != GST_FORMAT_INVALID)
386+
bool isInitialSetup = (stream->format == GST_FORMAT_INVALID || stream->format == GST_FORMAT_UNKNOWN);
387+
bool isValidNewFormat = (newFormat[i] != GST_FORMAT_INVALID && newFormat[i] != GST_FORMAT_UNKNOWN);
388+
if (isValidNewFormat || isInitialSetup)
387389
{
388390
MW_LOG_MIL("Closing stream %d old format = %d, new format = %d",i, stream->format, newFormat[i]);
389391
configureStream[i] = true;
390392
interfacePlayerPriv->gstPrivateContext->NumberOfTracks++;
391393
}
394+
else
395+
{
396+
MW_LOG_MIL("Skipping reconfiguration for stream %d - both format invalid/unknown",i);
397+
}
392398
}
393399
if(interfacePlayerPriv->socInterface->ShouldTearDownForTrickplay())
394400
{

0 commit comments

Comments
 (0)