Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It does not make semantic sense to modify m_tracks from outside DecoderBase or its subclasses. DecoderBase::InsertTrack() is only used by cc708reader.cpp for kTrackTypeCC708 The call graph eventually goes back to AvFormatDecoder::DecodeCCx08() which will call AvFormatDecoder::UpdateCaptionTracksFromStreams() afterwards, which calls AvFormatDecoder::UpdateATSCCaptionTracks() which will clear m_tracks[kTrackTypeCC608] and m_tracks[kTrackTypeCC708]. Therefore, the inserted track is immediately deleted before it is used. However, the emitted signal may do something, although I don’t know why it sends a signal to itself instead of being able to call it directly. The signal would be emitted if a track for that service_num was not in AvFormatDecoder::m_tracks. However, this does not make sense since the selected track has not changed and this track did not exist, so it was not in use to change. If there were no kTrackTypeCC708 tracks, the signal will still be emitted when AvFormatDecoder::GetFrame() next calls DecoderBase::AutoSelectTracks().
- Loading branch information