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

"Discontinuity detected" for MP3 streaming (dev branch) #398

Closed
mingfai opened this issue Apr 18, 2015 · 31 comments
Closed

"Discontinuity detected" for MP3 streaming (dev branch) #398

mingfai opened this issue Apr 18, 2015 · 31 comments
Assignees
Labels

Comments

@mingfai
Copy link

mingfai commented Apr 18, 2015

In the latest dev branch, the "Google Play (MP3 Audio)" sample doesn't work on a particular Android 4.1.2 (Samsung GT-N8000) device. It keeps printing "E/AudioTrack﹕ Discontinuity detected " and repeat playing the same audio clip of maybe around 1 second. (looping the buffer, presumably)

The log is as follows:

04-18 13:28:11.654  10200-10200/com.google.android.exoplayer.demo I/ExoPlayerImpl﹕ Init 1.3.0
04-18 13:28:11.654  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ start [0]
04-18 13:28:11.654  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.00, false, P]
04-18 13:28:11.659  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.00, true, I]
04-18 13:28:11.739  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.08, true, P]
04-18 13:28:12.614  10200-13425/com.google.android.exoplayer.demo D/dalvikvm﹕ GC_FOR_ALLOC freed 1185K, 18% free 8683K/10567K, paused 28ms, total 28ms
04-18 13:28:12.619  10200-13457/com.google.android.exoplayer.demo I/OMXClient﹕ Using client-side OMX mux.
04-18 13:28:12.624  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ state [0.96, true, B]
04-18 13:28:12.689  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ decoderInitialized [1.03]
04-18 13:28:12.969  10200-10200/com.google.android.exoplayer.demo D/EventLogger﹕ state [1.31, true, R]
04-18 13:28:12.974  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3268207, got 2948934]
04-18 13:28:13.209  10200-13425/com.google.android.exoplayer.demo D/dalvikvm﹕ GC_FOR_ALLOC freed 228K, 17% free 8791K/10567K, paused 32ms, total 32ms
04-18 13:28:13.324  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3320454, got 3001179]
04-18 13:28:13.694  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3372698, got 3053424]
04-18 13:28:13.814  10200-10202/com.google.android.exoplayer.demo D/dalvikvm﹕ GC_CONCURRENT freed 41K, 12% free 9330K/10567K, paused 16ms+13ms, total 73ms
04-18 13:28:14.064  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3424943, got 3105669]
04-18 13:28:14.439  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3477188, got 3157914]
04-18 13:28:14.809  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3529434, got 3210159]
04-18 13:28:15.174  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3581678, got 3262404]
04-18 13:28:15.554  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3633923, got 3314649]
04-18 13:28:15.924  10200-13424/com.google.android.exoplayer.demo E/AudioTrack﹕ Discontinuity detected [expected 3686169, got 3366894]

the test is based on the latest code after the "Avoid time discontinuity when retrying a live stream" commit related to issue #389

@ojw28
Copy link
Contributor

ojw28 commented Apr 18, 2015

I don't think this is related to retries. I doubt there's any retrying going on here. Looks like something is just broken. It may be device specific. I'll try and get hold of one and take a look.

Out of interest, do other samples in the demo app play properly on this device?

@mingfai
Copy link
Author

mingfai commented Apr 18, 2015

for "Google Play (MP3 Audio)", the problem is repeatable and happen in the first few seconds.

Except those require API level 18, I tested the first few seconds in every sample, as well as fully tested like half of the other < API 18 samples, including the MP4 Video one, all of them works fine.

@ojw28 ojw28 added the bug label Apr 27, 2015
@fergushowe
Copy link

I'm experiencing the exact same issue on the Samsung Galaxy S3 so I'd guess this affects a number of Samsung devices. AAC playback works great but MP3 playback is entirely broken and just skips the same section of audio while spitting out a "Discontinuity detected" message. Is this something that's likely to be fixed or is there a workaround of any kind?

@ojw28
Copy link
Contributor

ojw28 commented Aug 19, 2015

Is this still repeatable for you using the dev branch? I tried with a Galaxy S3 Mini and it worked fine for me on that. If you can still reproduce the issue using the latest dev branch, please go to "Settings->About Device" on the device, and provide (a) Model Number, (b) Android Version, (c) Build number (in full). Thanks!

@kboyarshinov
Copy link

The same issue with Samsung Galaxy Note 2 while playing both MP3 file and stream. Reproduces on both dev and master branches.
Model number: GT-N7105
Android version: 4.1.2
Build number: JZO54K.N7105XXDMB3

@fergushowe
Copy link

It's failing for me on the dev branch as well I'm afraid -

Model number: GT-I9300
Android version: 4.1.2
Build number: JZO54K.I9300XXEMF6

@ashemah
Copy link

ashemah commented Oct 5, 2015

Hi all, I'm also seeing this issue on a Samsung Galaxy SIII (Android 4.1.1) with the latest code from today.

Does anyone know what could be causing this or any way to work around it?

@VasiliyMikhailov
Copy link

I have the same issue on the dev branch and the master branch.

Model: Samsung Galaxy NOTE1 (GT-N7000)
Android version: 4.1.2
Build number: JZO54K.N7000XXLT9

But looping the buffer occur only in my app (with same log as above). The difference is that in my application I do not initialize the MediaCodecVideoTrackRenderer. In your demo app playback does not start and in the log we can see another message:

10-14 14:21:56.348: E/ExoPlayerImplInternal(26081): Internal track renderer error.
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081): com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.MediaCodecUtil$DecoderQueryException: Failed to query underlying media codecs
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.SampleSourceTrackRenderer.doPrepare(SampleSourceTrackRenderer.java:78)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.TrackRenderer.prepare(TrackRenderer.java:110)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:281)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at android.os.Handler.dispatchMessage(Handler.java:95)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at android.os.Looper.loop(Looper.java:137)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at android.os.HandlerThread.run(HandlerThread.java:60)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081): Caused by: com.google.android.exoplayer.MediaCodecUtil$DecoderQueryException: Failed to query underlying media codecs
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:133)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:112)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecUtil.getDecoderInfo(MediaCodecUtil.java:70)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecAudioTrackRenderer.handlesTrack(MediaCodecAudioTrackRenderer.java:224)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.SampleSourceTrackRenderer.doPrepare(SampleSourceTrackRenderer.java:76)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     ... 7 more
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081): Caused by: java.lang.IllegalArgumentException
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at android.media.MediaCodecList.getCodecCapabilities(Native Method)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at android.media.MediaCodecInfo.getCapabilitiesForType(MediaCodecInfo.java:211)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfoInternal(MediaCodecUtil.java:151)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:129)
10-14 14:21:56.348: E/ExoPlayerImplInternal(26081):     ... 11 more
10-14 14:21:56.383: E/EventLogger(26081): playerFailed [0.79]
10-14 14:21:56.383: E/EventLogger(26081): com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.MediaCodecUtil$DecoderQueryException: Failed to query underlying media codecs
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.SampleSourceTrackRenderer.doPrepare(SampleSourceTrackRenderer.java:78)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.TrackRenderer.prepare(TrackRenderer.java:110)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.ExoPlayerImplInternal.incrementalPrepareInternal(ExoPlayerImplInternal.java:281)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:205)
10-14 14:21:56.383: E/EventLogger(26081):   at android.os.Handler.dispatchMessage(Handler.java:95)
10-14 14:21:56.383: E/EventLogger(26081):   at android.os.Looper.loop(Looper.java:137)
10-14 14:21:56.383: E/EventLogger(26081):   at android.os.HandlerThread.run(HandlerThread.java:60)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.util.PriorityHandlerThread.run(PriorityHandlerThread.java:40)
10-14 14:21:56.383: E/EventLogger(26081): Caused by: com.google.android.exoplayer.MediaCodecUtil$DecoderQueryException: Failed to query underlying media codecs
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:133)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:112)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecUtil.getDecoderInfo(MediaCodecUtil.java:70)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecAudioTrackRenderer.handlesTrack(MediaCodecAudioTrackRenderer.java:224)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.SampleSourceTrackRenderer.doPrepare(SampleSourceTrackRenderer.java:76)
10-14 14:21:56.383: E/EventLogger(26081):   ... 7 more
10-14 14:21:56.383: E/EventLogger(26081): Caused by: java.lang.IllegalArgumentException
10-14 14:21:56.383: E/EventLogger(26081):   at android.media.MediaCodecList.getCodecCapabilities(Native Method)
10-14 14:21:56.383: E/EventLogger(26081):   at android.media.MediaCodecInfo.getCapabilitiesForType(MediaCodecInfo.java:211)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfoInternal(MediaCodecUtil.java:151)
10-14 14:21:56.383: E/EventLogger(26081):   at com.google.android.exoplayer.MediaCodecUtil.getMediaCodecInfo(MediaCodecUtil.java:129)
10-14 14:21:56.383: E/EventLogger(26081):   ... 11 more

Both problems occur only on that device. On other devices, it works fine.

I trying to play this:

Samples.java
public static final Sample[] HLS = new Sample[] {
        new Sample("MyMusic",
                "https://kroogi.com/api/bgbook/songs/3104283", PlayerActivity.TYPE_HLS),
};

@carliskisantiago
Copy link

Hello,
We're facing the same issue. We've tried a lot of different things without any result. We have two devices at least with problems:

Model Number: GT-N7000
Android Version: 4.1.2
Build Number: JZO54K.N7000UBLSG

Model Number: GT-I9100
Android Version: 4.1.2
Build Number: JZO54K.I9100UHMS8

The problem appears when we want to stream a mp3. The audio stream is OK because we're using it without any issue in other devices. We are attaching a bugreport of the first device I mentioned here. We also include the logcat at the time the error occurs. We've tried with master branch but also with different devs branches.

Thanks in advance :)

Santiago.

I cannot attach the bugreport so I'm sending it via email.

LOGCAT
10-14 12:31:15.483: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:15.483: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:39.688: W/IInputConnectionWrapper(11251): getSelectedText on inactive InputConnection
10-14 12:31:39.688: W/IInputConnectionWrapper(11251): setComposingText on inactive InputConnection
10-14 12:31:42.998: D/ProgressBar(11251): setProgressDrawable mProgressDrawable = null, d = android.graphics.drawable.LayerDrawable@41d78e28needUpdate = false
10-14 12:31:42.998: D/ProgressBar(11251): setProgress = 0
10-14 12:31:42.998: D/ProgressBar(11251): setProgress = 0, fromUser = false
10-14 12:31:42.998: D/ProgressBar(11251): mProgress = 0mIndeterminate = false, mMin = 0, mMax = 100
10-14 12:31:43.013: I/ExoPlayerImpl(11251): Init 1.4.1
10-14 12:31:43.013: D/EventLogger(11251): start [0]
10-14 12:31:43.013: D/EventLogger(11251): state [0.00, false, P]
10-14 12:31:43.013: D/EventLogger(11251): state [0.00, true, I]
10-14 12:31:43.108: D/EventLogger(11251): state [0.10, true, P]
10-14 12:31:43.188: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:43.188: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:43.548: D/EventLogger(11251): state [0.54, true, B]
10-14 12:31:43.753: I/OMXClient(11251): Using client-side OMX mux.
10-14 12:31:43.768: D/EventLogger(11251): decoderInitialized [0.75, OMX.SEC.MP3.Decoder]
10-14 12:31:46.358: D/EventLogger(11251): state [3.35, true, R]
10-14 12:31:46.393: D/dalvikvm(11251): GC_CONCURRENT freed 475K, 12% free 12880K/14535K, paused 17ms+6ms, total 50ms
10-14 12:31:46.743: E/AudioTrack(11251): Discontinuity detected [expected 3268207, got 2948934]
10-14 12:31:47.138: E/AudioTrack(11251): Discontinuity detected [expected 3320454, got 3001179]
10-14 12:31:47.508: E/AudioTrack(11251): Discontinuity detected [expected 3372698, got 3053424]
10-14 12:31:47.883: E/AudioTrack(11251): Discontinuity detected [expected 3424943, got 3105669]
10-14 12:31:48.258: E/AudioTrack(11251): Discontinuity detected [expected 3477188, got 3157914]
10-14 12:31:48.628: E/AudioTrack(11251): Discontinuity detected [expected 3529434, got 3210159]
10-14 12:31:48.998: E/AudioTrack(11251): Discontinuity detected [expected 3581678, got 3262404]
10-14 12:31:49.373: E/AudioTrack(11251): Discontinuity detected [expected 3633923, got 3314649]
10-14 12:31:49.738: E/AudioTrack(11251): Discontinuity detected [expected 3686169, got 3366894]
10-14 12:31:50.108: E/AudioTrack(11251): Discontinuity detected [expected 3738413, got 3419138]
10-14 12:31:50.483: E/AudioTrack(11251): Discontinuity detected [expected 3790657, got 3471383]
10-14 12:31:50.853: E/AudioTrack(11251): Discontinuity detected [expected 3842902, got 3523628]
10-14 12:31:51.223: E/AudioTrack(11251): Discontinuity detected [expected 3895148, got 3575873]
10-14 12:31:51.598: E/AudioTrack(11251): Discontinuity detected [expected 3947392, got 3628118]
10-14 12:31:51.973: E/AudioTrack(11251): Discontinuity detected [expected 3999637, got 3680363]
10-14 12:31:52.338: E/AudioTrack(11251): Discontinuity detected [expected 4051882, got 3732608]
10-14 12:31:52.718: E/AudioTrack(11251): Discontinuity detected [expected 4104128, got 3784853]
10-14 12:31:53.088: E/AudioTrack(11251): Discontinuity detected [expected 4156372, got 3837098]
10-14 12:31:53.453: E/AudioTrack(11251): Discontinuity detected [expected 4208617, got 3889343]
10-14 12:31:53.828: E/AudioTrack(11251): Discontinuity detected [expected 4260863, got 3941587]
10-14 12:31:54.198: E/AudioTrack(11251): Discontinuity detected [expected 4313106, got 3993832]
10-14 12:31:54.468: D/EventLogger(11251): end [11.46]
10-14 12:31:54.488: W/MessageQueue(11251): Handler (com.google.android.exoplayer.upstream.Loader$LoadTask) {41e12278} sending message to a Handler on a dead thread
10-14 12:31:54.488: W/MessageQueue(11251): java.lang.RuntimeException: Handler (com.google.android.exoplayer.upstream.Loader$LoadTask) {41e12278} sending message to a Handler on a dead thread
10-14 12:31:54.488: W/MessageQueue(11251): at android.os.MessageQueue.enqueueMessage(MessageQueue.java:294)
10-14 12:31:54.488: W/MessageQueue(11251): at android.os.Handler.sendMessageAtTime(Handler.java:473)
10-14 12:31:54.488: W/MessageQueue(11251): at android.os.Handler.sendMessageDelayed(Handler.java:446)
10-14 12:31:54.488: W/MessageQueue(11251): at android.os.Handler.sendEmptyMessageDelayed(Handler.java:410)
10-14 12:31:54.488: W/MessageQueue(11251): at android.os.Handler.sendEmptyMessage(Handler.java:395)
10-14 12:31:54.488: W/MessageQueue(11251): at com.google.android.exoplayer.upstream.Loader$LoadTask.run(Loader.java:212)
10-14 12:31:54.488: W/MessageQueue(11251): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
10-14 12:31:54.488: W/MessageQueue(11251): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
10-14 12:31:54.488: W/MessageQueue(11251): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
10-14 12:31:54.488: W/MessageQueue(11251): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
10-14 12:31:54.488: W/MessageQueue(11251): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
10-14 12:31:54.488: W/MessageQueue(11251): at java.lang.Thread.run(Thread.java:856)
10-14 12:31:54.563: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:54.563: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:31:54.578: W/SurfaceView(11251): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=false left=false top=false
10-14 12:31:58.123: I/dalvikvm(11251): threadid=3: reacting to signal 3
10-14 12:31:58.138: I/dalvikvm(11251): Wrote stack traces to '/data/anr/traces.txt'
10-14 12:32:10.038: W/IInputConnectionWrapper(11251): getSelectedText on inactive InputConnection
10-14 12:32:10.043: W/IInputConnectionWrapper(11251): setComposingText on inactive InputConnection
10-14 12:34:01.608: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
10-14 12:34:01.613: E/SpannableStringBuilder(11251): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

@permenko
Copy link

same issue

Model Number: Samsung SGH-i777
Android Version: 4.1.2
Build Number: JZO54K.I777UCMD8

with google play (mp3 audio): http://storage.googleapis.com/exoplayer-test-media-0/play.mp
and radio stream: http://boorime.com:8000/boorime

@plastec
Copy link

plastec commented Nov 9, 2015

We also face this problem on Samsung devices with Android 4,1.

Does anyone has a workaround or suggestion how to handle this issue?

@zondaOf2012
Copy link

We also face this problem on Moto Nexus 6 with android 6.0.

with exoplay hls play : http://video.myzaker.com/201511/video_b2.m3u8

@ojw28
Copy link
Contributor

ojw28 commented Nov 23, 2015

@zondaOf2012 - Your issue is different, in that the media you've linked to is bad. This is why you (probably) only see the issue for the specific video you've linked to, and none of the HLS samples in the demo app.

I didn't look in detail at the media, but it looks like there's probably a discontinuity in the TS timestamps (i.e. the timestamps reset back to 0 in the second segment, rather than continuing on from the ones in the first segment like they should do). This is invalid in HLS unless an #EXT-X-DISCONTINUITY tag is inserted between the two segments. Inserting such a tag appears the fix the problem when I simulated it locally.

@kaltindas
Copy link

I am facing same issue with following device:

Model Number: GT-N7000
Android Version: 4.1.2

is there any fixes?

@GoranStorytel
Copy link

We also have this issue, any progress?

@icastell
Copy link

We are having the same issue in S2 and S3 devices with Android 4.1.2. Is there any planning of fix this bug? It's pretty critical for our music app.

@andrewlewis andrewlewis self-assigned this Jan 18, 2016
ojw28 pushed a commit that referenced this issue Jan 18, 2016
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112412961
@ojw28
Copy link
Contributor

ojw28 commented Jan 18, 2016

This should be fixed on API level 16. We're not aware of the issue affecting any other API levels, but if you discover that other API levels are affected, please let us know.

@ojw28 ojw28 closed this as completed Jan 18, 2016
@icastell
Copy link

Thanks @ojw28 and @andrewlewis . The issue seems half-fixed, I mean If I apply the work around the audio sounds well until the screen is on, when the phone goes to sleep (screen black) the audio starts to listen clipped.

In log console each time the cut is produced I see the follow lines:
W/AudioTrack: releaseBuffer() track 0x601dea40 name=0x4 disabled, restarting
W/AudioTrack: releaseBuffer() track 0x601dea40 name=0x4 disabled, restarting
W/AudioTrack: releaseBuffer() track 0x601dea40 name=0x4 disabled, restarting
W/AudioTrack: releaseBuffer() track 0x601dea40 name=0x4 disabled, restarting

Each of the below lines is a clip.

I've tested it with this audio:
http://mvod.lvlt.rtve.es/resources/TE_S180GRA/mp3/8/7/1453115855678.mp3

Any ideas?

Thanks!

@andrewlewis
Copy link
Collaborator

@icastell I wasn't able to reproduce the issue you described using the ExoPlayer demo app on a GT-I9100 running 4.1.2. Any idea whether this affects only some of the devices mentioned on this issue? Can you reproduce it in the demo app?

Does your app hold a WakeLock and WifiLock while playing audio in the background? If not, please try that.

@icastell
Copy link

Hi, I'm testing with a I9300, I don't have a I9100 at this moment. I tried with demo app also and the error continues. The steps I follow to reproduce with demo app are:

  1. Play the audio http://mvod.lvlt.rtve.es/resources/TE_S180GRA/mp3/8/7/1453115855678.mp3
  2. Press Audio button, and enable Play in background
  3. Go to sleep the phone by pressing on/off button.
  4. Then the audio continues playing but a clipped is produced every couple of seconds.

If you follow the above steps, can you reproduce the error?

My app is using WakeLock and WifiLock and I have the same issue :(

Thanks!

@andrewlewis
Copy link
Collaborator

Audio plays correctly when I follow those steps, so it looks like the GT-I9100 is not affected.

I'm trying to get hold of a GT-I9300 running 4.1.2 to replicate your setup.

@icastell
Copy link

@andrewlewis really thanks for your effort!

@ojw28 ojw28 reopened this Jan 19, 2016
@andrewlewis
Copy link
Collaborator

@icastell I couldn't reproduce this on samsung/m0xx/m0:4.1.2/JZO54K/I9300XXEMG4:user/release-keys either, following the steps above: the MP3 plays fine in the background (screen off) from the ExoPlayer demo app.

There are several versions of this device, so please could you paste the output of adb shell getprop ro.build.fingerprint so we can check that the devices are the same?

@icastell
Copy link

It seems the same, samsung/m0xx/m0:4.1.2/JZO54K/I9300XXEMG4:user/release-keys For more info, to play the audio I'm using Google Play (MP3 Audio) option, which option are you using to play it?

@andrewlewis
Copy link
Collaborator

I've tried both Google Play (MP3 Audio) and the URL you pasted above, and ExoPlayer from the dev branch (which uses ExtractorSampleSource).

I wonder if this is related to the network. Could you try pushing the file locally and playing it from /sdcard/ or similar?

Can you think of anything else that could be different? It's a shot in the dark, but maybe try restarting the phone in case the mediaserver is somehow in a bad state, or even factory reset the device.

@icastell
Copy link

Unbelievable ... I reboot the phone and it works ... I love computers ...

I think the bug is solved XD Thanks, thanks thanks!

@andrewlewis
Copy link
Collaborator

Glad it seems to be fixed for now.

For what it's worth, if you search for Galaxy S3 background audio stuttering problems, there are a couple of cases of people describing that removing a SIM card fixed the issue. That may be worth a try if you can reproduce the issue again. If the problem relates to background data usage, it's unlikely we would be able to implement a workaround in ExoPlayer.

@icastell
Copy link

Hi,

After a while users starts to reports a huge amount of errors related with this. After playing some audios for 7-8 minutes the audios stop suddenly.

I can reproduce the error with this link: http://www.ivoox.com/universo-iker-t1x24-dos-noche_mn_10481190_api_1.mp3 and in a Samsung S3 device. Please, could you try with your devices if your can reproduce it?

Thanks!

@ojw28
Copy link
Contributor

ojw28 commented Feb 24, 2016

Does this reproduce in the latest version of the ExoPlayer demo app using the link above? If so, please attach a full bug report captured with "adb bugreport" taken on the device shortly after the issue is encountered. Thanks.

@sabrinaj
Copy link

Hello,
I reproduced the issue on Android 4.2.2 and had to add the following lines to the exoplayer library, below the previous workaround (https://github.com/KMK-ONLINE/ExoPlayer/commit/903bb1dcc39e1d36951d47f3e581bbbd0eb40967):

if (Util.SDK_INT == 17 && "OMX.SEC.MP3.Decoder".equals(name)) {
      return false;
}

The problematic device:

  • Model Number: SM-T310
  • Android Version: 4.2.2
  • Build Number: JDQ39.T310XXUAMK1

It would be great if it could be included so we could switch back to a jCenter dependency. :-)

ojw28 added a commit that referenced this issue May 10, 2016
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121949973
@ojw28
Copy link
Contributor

ojw28 commented May 10, 2016

Done.

ojw28 added a commit that referenced this issue Jun 15, 2016
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121949973
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests