Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange Audio "pause behavior" when pause a movie #15620

Open
1 of 7 tasks
iz8mbw opened this issue Feb 26, 2019 · 4 comments
Open
1 of 7 tasks

Strange Audio "pause behavior" when pause a movie #15620

iz8mbw opened this issue Feb 26, 2019 · 4 comments

Comments

@iz8mbw
Copy link

iz8mbw commented Feb 26, 2019

Bug report

Kodi goes to "pause" audio stream when we put in pause a movie and this causes some audio lost after resume playback.

Describe the bug

As already discuessed here #15601 (comment) when we go to put in pause a movie (a content) Kodi will go to "Pause" the audio stream and later will go to "resume" it again.
On the AVR I see the codec disappear and after about 500ms appear again, and this happens when the movie is still in pause!
When I play again the paused movie (resume playback) on the AVR I see the codec disappear again and after about 500ms appear again (so video starts before the audio) and so we will lost some audio moments because video starts a little bit before caused by this "strange pause audio behavior"....
This happens when "Keep audio device alive" is enabled (since "Keep audio device alive" is enabled I expect that Kodi will NOT to go to do nothing).

Instead if we go to disable "Keep audio device alive" it's worse because the behavior is the same but it's more "slow" because when Kodi will go to "pause" the audio stream, the codec on my AVR will change from the movies' codec (example Dolby Digital) to PCM and when I resume playback changes again from PCM to the movies' codec (example Dolby Digital). Also in this case we will lost some audio moments because video starts a little bit before.

Expected Behavior

What I expect is: if I put in pause a movie then NO new "audio stream pause/interruption/signal" should be sent.

Actual Behavior

Described in the "Describe the bug" section

To Reproduce

Steps to reproduce the behavior:

  1. Put in play (in audio passthrough) a movie
  2. Put in pause
  3. Resume playback

Debuglog

The debuglog can be found here: https://paste.kodi.tv/bujagucizi.kodi

Additional context or screenshots (if appropriate)

From the log:
I put in pause the movie:

2019-02-25 20:36:25.372 T:13008   DEBUG: HandleKey: return (0xf00d) pressed, action is Select
2019-02-25 20:36:25.373 T:13013   DEBUG: CAnnouncementManager - Announcement: OnPause from xbmc
2019-02-25 20:36:25.373 T:13013   DEBUG: void CXBMCApp::OnPlayBackPaused()

and the Audio "behavior":

2019-02-25 20:36:25.392 T:13209   DEBUG: CDVDAudio::Pause - pausing audio stream
2019-02-25 20:36:25.392 T:13208   DEBUG: CDVDVideoCodecAndroidMediaCodec::AddData dts:2825823000.00 pts:2825990000.00 sz:106715 indexBuffer:-1 current state (3)
2019-02-25 20:36:25.421 T:13008   DEBUG: Previous line repeats 23 times.
2019-02-25 20:36:25.421 T:13008   DEBUG: CMediaCodecVideoBuffer::ReleaseOutputBuffer index(5), render(1), time:86028219578118, offset:52920259
2019-02-25 20:36:25.422 T:13208   DEBUG: CDVDVideoCodecAndroidMediaCodec::AddData dts:2825823000.00 pts:2825990000.00 sz:106715 indexBuffer:-1 current state (3)
2019-02-25 20:36:25.581 T:13008   DEBUG: Previous line repeats 133 times.
2019-02-25 20:36:25.582 T:13008   DEBUG: Uninhibiting OS screen saver
2019-02-25 20:36:25.583 T:13208   DEBUG: CDVDVideoCodecAndroidMediaCodec::AddData dts:2825823000.00 pts:2825990000.00 sz:106715 indexBuffer:-1 current state (3)
2019-02-25 20:36:29.626 T:13008   DEBUG: Previous line repeats 3375 times.

Then I resume payback:

2019-02-25 20:36:29.709 T:13013   DEBUG: CAnnouncementManager - Announcement: OnResume from xbmc
2019-02-25 20:36:29.709 T:13013   DEBUG: void CXBMCApp::OnPlayBackStarted()
2019-02-25 20:36:29.710 T:13208   DEBUG: CDVDVideoCodecAndroidMediaCodec::AddData dts:2825823000.00 pts:2825990000.00 sz:106715 indexBuffer:-1 current state (3)
2019-02-25 20:36:29.715 T:13013   DEBUG: Visible Behind request: false
2019-02-25 20:36:29.716 T:13013   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnResume
2019-02-25 20:36:29.716 T:13019   DEBUG: ActiveAE - start sync of audio stream
2019-02-25 20:36:29.716 T:13208   DEBUG: CDVDVideoCodecAndroidMediaCodec::AddData dts:2825823000.00 pts:2825990000.00 sz:106715 indexBuffer:-1 current state (3)
2019-02-25 20:36:29.717 T:13209   DEBUG: CDVDAudio::Resume - resume audio stream
2019-02-25 20:36:29.718 T:13013   DEBUG: UPnP: Building didl for object 'smb://NAS/Multimedia/Film/HD/Cartoon/Movie_with_DTS_track.mkv'

Your Environment

Used Operating system:

  • Android

  • iOS

  • Linux

  • OSX

  • Raspberry-Pi

  • Windows

  • Windows UWP

  • Operating system version/name: Android 8 on Nvidia Shield (2017 model) with firmware 7.2.3

  • Kodi version: 18.2-RC1 Git:20190224

note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@iz8mbw
Copy link
Author

iz8mbw commented Feb 26, 2019

@peak3d @fritsch as suggested, new Issue created.
Thank you!

@bronnel
Copy link

bronnel commented Apr 19, 2019

I think this issue is similar to mine correct me if I'm wrong , when I pause the a movie and then resume playback a couple of seconds of the audio is lost , this problem has been there since krypton and continues with latest version of leia

@iz8mbw
Copy link
Author

iz8mbw commented Apr 30, 2019

Yes. This problem is the same.

@rafakob
Copy link

rafakob commented Jan 18, 2022

Any luck with that? :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants