Please sign in to comment.
Refactor 'eof' handling in the decoder and player classes.
This moves all eof 'ownership' into the decoder which is then queried by the player as needed. AvFormatDecoder is extended to reset the picture buffer eof flag to zero if we are clearing the eof state. This fixes livetv program transitions where the decoder has already decided it has hit the end of the file before we switch to the next program and as a result stops returning frames. My only concern here is the extra locking now required inside the GetEof method in MythPlayer. The current plan of action is however to ensure the decoder locking is 'industrial strength' (Hint: it currently isn't) before looking at how to minimise the locking required in the main playback loop.
- Loading branch information...
Showing with 65 additions and 44 deletions.
- +13 −2 mythtv/libs/libmythtv/avformatdecoder.cpp
- +3 −1 mythtv/libs/libmythtv/avformatdecoder.h
- +1 −1 mythtv/libs/libmythtv/decoderbase.cpp
- +3 −0 mythtv/libs/libmythtv/decoderbase.h
- +1 −1 mythtv/libs/libmythtv/mythcommflagplayer.cpp
- +36 −24 mythtv/libs/libmythtv/mythplayer.cpp
- +2 −3 mythtv/libs/libmythtv/mythplayer.h
- +6 −12 mythtv/libs/libmythtv/nuppeldecoder.cpp