Skip to content

Commit

Permalink
ensure subtitleTrack to be -1 at init if not player before
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed May 22, 2024
1 parent f9694c3 commit 60c9a00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/com/archos/mediacenter/utils/videodb/VideoDbInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ public static VideoDbInfo fromCursor(Cursor c, boolean shouldMoveToNext) {
result.resume = c.getInt(IDX_BOOKMARK);
result.bookmark = c.getInt(IDX_ARCHOS_BOOKMARK);
int playerParams = c.getInt(IDX_PLAYER_PARAMS);
result.audioTrack = VideoStore.paramsToAudioTrack(playerParams);
// ensure that audioTrack is -1 if not played before
if (playerParams != 0) result.audioTrack = VideoStore.paramsToAudioTrack(playerParams);
else result.audioTrack = -1;
result.subtitleTrack = VideoStore.paramsToSubtitleTrack(playerParams);
result.subtitleDelay = c.getInt(IDX_SUBTITLE_DELAY);
result.subtitleRatio = c.getInt(IDX_SUBTITLE_RATIO);
Expand Down

0 comments on commit 60c9a00

Please sign in to comment.