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

Decoder issue while playing MidRoll Ads with Exoplayer 2.14 in Android11 #9358

Closed
ursurya opened this issue Aug 31, 2021 · 5 comments
Closed
Assignees

Comments

@ursurya
Copy link

ursurya commented Aug 31, 2021

HI Team,

We are getting below error when tried to play Our DRM Widevine Stream Url with Midroll Ads in Exoplayer 2.14. Player is showing this error when about to play the First Midroll Ad. We are having only Midroll ads. We are using Vmap xml to play Ads. Observed this issue so far only in Android 11 . We tried playing our stream Url with Exoplayer sample app and got same issue .
Due to this issue we were not able to release our app with Ads. Please let us know if any other information is required from us. Please help

As we cannot share the Stream Url and Drm info publicly, we will mail it to dev.exoplayer@gmail.com

W/MediaCodecRenderer: Failed to initialize decoder: OMX.qcom.video.decoder.avc
java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2128)
at android.media.MediaCodec.configure(MediaCodec.java:2044)
at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:50)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1142)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1049)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:606)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:2163)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processEndOfStream(MediaCodecRenderer.java:2038)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1871)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:945)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:245)
at android.os.HandlerThread.run(HandlerThread.java:67)
2021-08-26 14:21:44.728 19810-5306/com.firstshows D/SurfaceUtils: connecting to surface 0x793b9adc70, reason pushBlankBuffersToNativeWindow(err2)
2021-08-26 14:21:44.728 19810-5164/com.firstshows E/ExoPlayerImplInternal: Playback error
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(2, null, null, video/avc, avc1.4D4028, -1, null, [1920, 1080, 29.97003], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:555)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:245)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(2, null, null, video/avc, avc1.4D4028, -1, null, [1920, 1080, 29.97003], [-1, -1])
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1056)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:606)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:2163)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processEndOfStream(MediaCodecRenderer.java:2038)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1871)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:945)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:245)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2128)
at android.media.MediaCodec.configure(MediaCodec.java:2044)
at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:50)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1142)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1049)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:606)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:2163)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processEndOfStream(MediaCodecRenderer.java:2038)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1871)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:945)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:478)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:245)
at android.os.HandlerThread.run(HandlerThread.java:67)

Thanks,

@ursurya
Copy link
Author

ursurya commented Sep 1, 2021

Hi Team,
Mailed our Stream URL and License URL to dev.exoplayer@gmail.com with Subject "Issue 9358"
Thanks,

@icbaker
Copy link
Collaborator

icbaker commented Sep 1, 2021

Thanks for the media & license URL - I don't think you provided an ad tag URL though? So I don't think I can reproduce the exact setup you're seeing.

The logcat snippet provided and the behaviour described look like a possible duplicate of #8696 - but I'd like to see some more log output to confirm. I'm specifically looking for lines like this:

E/SurfaceUtils: Failed to connect to surface 0x71e621ca70, err -22
E/MediaCodec: nativeWindowConnect returned an error: Invalid argument (-22)

If you see those lines logged when you see this problem:

  • Let me know, and I'll close this as a duplicate.
  • You can try using MediaItem.Builder#setDrmSessionForClearPeriods() to avoid the decoder switch that causes the problem, which will hopefully fix it for you.

@ursurya
Copy link
Author

ursurya commented Sep 3, 2021

HI icbaker,
Thanks for your quick reply. We tried the solution mentioned above and it didn't worked. We are also getting the err -22 like you mentioned above.Below are the details of Error Log, Ad tag and devices in which we are facing this issue

Devices:
OnePlus Nord Ac2001
Oppo RMX3242
Realme CPH2061

AdTag :
https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&cmsid=496&vid=short_onecue&correlator=

Error Log:

09-02 18:32:29.321 11649 11649 E Controller: progress changed 706fromuser false
09-02 18:32:29.321 11649 11649 I System.out: onProgressChanged706
09-02 18:32:29.411  1367  1367 I cnss-daemon: nl80211 response handler invoked
09-02 18:32:29.411  1367  1367 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 13  received
09-02 18:32:29.411   933 14528 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd
09-02 18:32:29.697 22392 22412 D CompatibilityChangeReporter: Compat change id reported: 150939131; UID 10215; state: ENABLED
09-02 18:32:30.253 11649 11649 E PlayerControlView: update Progress
09-02 18:32:30.313 11649 11649 E Controller: progress changed 805fromuser false
09-02 18:32:30.313 11649 11649 I System.out: onProgressChanged805
09-02 18:32:30.571 22542 22685 E sqlite3_android: [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
09-02 18:32:30.621   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: unbindService is called for service : com.google.android.gms/.measurement.service.MeasurementBrokerService and for client com.netflix.mediaclient
09-02 18:32:30.621   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: size of service connections for service: com.google.android.gms/.measurement.service.MeasurementBrokerServiceafter removal is 1
09-02 18:32:30.621   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: size of client connections for client: com.netflix.mediaclientafter removal is 0
09-02 18:32:28.634  1582  4022 W UriGrantsManagerService: No permission grants found for com.google.android.apps.photos
09-02 18:32:30.772  1582  1818 I OHPD    : mCurrentGpsUidList:[], currentIME:com.google.android.inputmethod.latin
09-02 18:32:30.772  1582  1818 I OHPD    : [BgDetect]chkExcessCpu level: 1 doKills: true critical false uptime: 300128
09-02 18:32:30.772  1582  1818 I OHPD    : isIsolated process: app.uid:99467,app.info.uid:10835, app.processName:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0
09-02 18:32:30.773  1582  1818 I OHPD    : isIsolated process: app.uid:99142,app.info.uid:10135, app.processName:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0
09-02 18:32:30.773  1582  1818 I OHPD    : isIsolated process: app.uid:99382,app.info.uid:10211, app.processName:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0
09-02 18:32:30.774  1582  1818 I OHPD    : isIsolated process: app.uid:99328,app.info.uid:10257, app.processName:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0
09-02 18:32:30.946   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: unbindService is called for service : com.google.android.gms/.measurement.service.MeasurementBrokerService and for client com.google.android.youtube
09-02 18:32:30.946   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: size of service connections for service: com.google.android.gms/.measurement.service.MeasurementBrokerServiceafter removal is 0
09-02 18:32:30.946   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: size of client connections for client: com.google.android.youtubeafter removal is 3
09-02 18:32:30.950   968 11623 I vendor.qti.hardware.servicetracker@1.2-service: destroyService is called for service : com.google.android.gms/.measurement.service.MeasurementBrokerService
09-02 18:32:30.951  6556  6556 D BoundBrokerSvc: onUnbind: Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms }
09-02 18:32:30.986 22799 22819 I metadataservic: Waiting for a blocking GC ProfileSaver
09-02 18:32:30.991 22799 22819 I metadataservic: WaitForGcToComplete blocked ProfileSaver on AddRemoveAppImageSpace for 5.125ms
09-02 18:32:31.008 22799 22811 I metadataservic: WaitForGcToComplete blocked RunEmptyCheckpoint on ProfileSaver for 16.610ms
09-02 18:32:31.263 11649 11649 E PlayerControlView: update Progress
09-02 18:32:31.362 11649 11649 E Controller: progress changed 906fromuser false
09-02 18:32:31.362 11649 11649 I System.out: onProgressChanged906
09-02 18:32:31.413   933 14528 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0xd
09-02 18:32:31.414  1367  1367 I cnss-daemon: nl80211 response handler invoked
09-02 18:32:31.414  1367  1367 I cnss-daemon: nl80211_response_handler: cmd 103, vendorID 4980, subcmd 13  received
09-02 18:32:31.628 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory clearkey
09-02 18:32:31.632 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory wfdhdcp
09-02 18:32:31.635 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory widevine
09-02 18:32:31.638 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory clearkey
09-02 18:32:31.639 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory wfdhdcp
09-02 18:32:31.641 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory widevine
09-02 18:32:31.641  1331  1414 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:31.642   917  5044 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:31.643  1331  1414 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:31.643   917  5044 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:31.824 11649 22772 D CCodecBufferChannel: [c2.android.aac.decoder#649] MediaCodec discarded an unknown buffer
09-02 18:32:31.829 11649 22772 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
09-02 18:32:31.831  1366  9776 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
09-02 18:32:31.838 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory clearkey
09-02 18:32:31.840 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory wfdhdcp
09-02 18:32:31.841 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory widevine
09-02 18:32:31.843 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory clearkey
09-02 18:32:31.844 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory wfdhdcp
09-02 18:32:31.845 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory widevine
09-02 18:32:31.846  1331  1414 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:31.846   917  6872 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:31.847  1331  1392 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:31.847   917  5044 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:31.850 11649 22853 D CCodec  : allocate(c2.android.aac.decoder)
09-02 18:32:31.852 11649 22853 I CCodec  : Created component [c2.android.aac.decoder]
09-02 18:32:31.852 11649 22853 D CCodecConfig: read media type: audio/mp4a-latm
09-02 18:32:31.855 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
09-02 18:32:31.855 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values
09-02 18:32:31.856 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
09-02 18:32:31.856 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
09-02 18:32:31.856 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.allocator-ids.values
09-02 18:32:31.856 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
09-02 18:32:31.856 11649 22853 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values
09-02 18:32:31.860 11649 22853 I CCodecConfig: query failed after returning 19 values (BAD_INDEX)
09-02 18:32:31.860 11649 22853 D CCodecConfig: c2 config diff is Dict {
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 coded.aac-packaging.value = 0
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 coded.bitrate.value = 64000
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 coded.pl.level = 0
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 coded.pl.profile = 8192
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::i32 coding.drc.album-mode.value = 0
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::float coding.drc.attenuation-factor.value = 1
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::float coding.drc.boost-factor.value = 1
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::i32 coding.drc.compression-mode.value = 3
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::i32 coding.drc.effect-type.value = 3
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::float coding.drc.encoded-level.value = 0.25
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::float coding.drc.reference-level.value = -16
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 input.buffers.max-size.value = 8192
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 input.delay.value = 0
09-02 18:32:31.860 11649 22853 D CCodecConfig:   string input.media-type.value = "audio/mp4a-latm"
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 output.delay.value = 2
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::float output.drc.output-loudness.value = 0.25
09-02 18:32:31.860 11649 22853 D CCodecConfig:   string output.media-type.value = "audio/raw"
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 raw.channel-count.value = 1
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 raw.max-channel-count.value = 8
09-02 18:32:31.860 11649 22853 D CCodecConfig:   c2::u32 raw.sample-rate.value = 44100
09-02 18:32:31.860 11649 22853 D CCodecConfig: }
09-02 18:32:31.861 11649 22853 D CCodec  : [c2.android.aac.decoder] buffers are bound to CCodec for this session
09-02 18:32:31.861 11649 22853 D CCodecConfig: no c2 equivalents for flags
09-02 18:32:31.862 11649 22853 D CCodecConfig: c2 config diff is   c2::u32 raw.channel-count.value = 2
09-02 18:32:31.862 11649 22853 D CCodecConfig:   c2::u32 raw.sample-rate.value = 48000
09-02 18:32:31.863 11649 22853 W Codec2Client: query -- param skipped: index = 1107298332.
09-02 18:32:31.863 11649 22853 D CCodec  : setup formats input: AMessage(what = 0x00000000) = {
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-album-mode = 0
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-boost-level = 127
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-cut-level = 127
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-effect-type = 3
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-heavy-compression = 3
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-encoded-target-level = -1
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-max-output-channel_count = 8
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-target-ref-level = 64
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t channel-count = 2
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t level = 0
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t max-input-size = 8192
09-02 18:32:31.863 11649 22853 D CCodec  :   string mime = "audio/mp4a-latm"
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t profile = 2
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t sample-rate = 48000
09-02 18:32:31.863 11649 22853 D CCodec  : } and output: AMessage(what = 0x00000000) = {
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-album-mode = 0
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-boost-level = 127
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-cut-level = 127
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-effect-type = 3
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-heavy-compression = 3
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-drc-output-loudness = -1
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-encoded-target-level = -1
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-max-output-channel_count = 8
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t aac-target-ref-level = 64
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t channel-count = 2
09-02 18:32:31.863 11649 22853 D CCodec  :   string mime = "audio/raw"
09-02 18:32:31.863 11649 22853 D CCodec  :   int32_t sample-rate = 48000
09-02 18:32:31.863 11649 22853 D CCodec  : }
09-02 18:32:31.864 11649 22853 W Codec2Client: query -- param skipped: index = 1342179345.
09-02 18:32:31.864 11649 22853 W Codec2Client: query -- param skipped: index = 2415921170.
09-02 18:32:31.864 11649 22853 W Codec2Client: query -- param skipped: index = 1610614798.
09-02 18:32:31.865 11649 22853 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.865 11649 22853 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.865 11649 22853 D CCodecBufferChannel: [c2.android.aac.decoder#891] Created input block pool with allocatorID 16 => poolID 18 - OK (0)
09-02 18:32:31.870  1366  9776 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.870  1366  9776 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.870  1366  9776 D BufferPoolAccessor2.0: bufferpool2 0xb400006e888716a8 : 0(0 size) total buffers - 0(0 size) used buffers - 29/34 (recycle/alloc) - 5/33 (fetch/transfer)
09-02 18:32:31.870 11649 22853 I CCodecBufferChannel: [c2.android.aac.decoder#891] Created output block pool with allocatorID 16 => poolID 4040 - OK
09-02 18:32:31.870 11649 22853 D CCodecBufferChannel: [c2.android.aac.decoder#891] Configured output block pool ids 4040 => OK
09-02 18:32:31.871 11649 22853 D CCodecBufferChannel: [c2.android.aac.decoder#891] start: updating output delay 2
09-02 18:32:31.871  1366 22854 D SimpleC2Component: Using output block pool with poolID 4040 => got 4040 - 0
09-02 18:32:31.877 11649 22853 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.877  1366  9776 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.884  1582  4022 I StatusBarManagerService: onVideoChanged: using= true
09-02 18:32:31.892  1366 22854 I C2SoftAacDec: Reconfiguring decoder: 0->48000 Hz, 0->2 channels
09-02 18:32:31.908  1366 22854 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.909 11649 22430 E FMQ     : grantorIdx must be less than 3
09-02 18:32:31.911 11649 22853 D CCodecConfig: c2 config diff is   c2::i32 coding.drc.compression-mode.value = 1
09-02 18:32:31.911 11649 22853 D CCodecBuffers: [c2.android.aac.decoder#891:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = {
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-album-mode = 0
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-boost-level = 127
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-cut-level = 127
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-effect-type = 3
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-heavy-compression = 1
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-drc-output-loudness = -1
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-encoded-target-level = -1
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-max-output-channel_count = 8
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t aac-target-ref-level = 64
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t channel-count = 2
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   string mime = "audio/raw"
09-02 18:32:31.911 11649 22853 D CCodecBuffers:   int32_t sample-rate = 48000
09-02 18:32:31.911 11649 22853 D CCodecBuffers: }
09-02 18:32:31.959 11649 22380 D AudioTrack: ClientUid 10835 AudioTrack::stop 
09-02 18:32:31.959 11649 22380 D AudioTrack: stop(10161): called with 440320 frames delivered
09-02 18:32:31.963  1582  4022 I AS.AudioService: playerEvent: 66327 event: 4 isMusicActive:true device:2 currentPackageName:com.dummy
09-02 18:32:31.963  1582  4022 I OpAudioMonitor: MDM,stop.
09-02 18:32:31.964  1582  4022 I OpAudioMonitor: MDM,stop startTime:1630587741 endTime:1630587751
09-02 18:32:31.964  1582  2267 I OpAudioMonitor: logMdm run preserveOsData tag:audio_connect
09-02 18:32:31.964  1582  2267 D gwy     : OS Event: audio_connect
09-02 18:32:31.965  1582  4022 I OpAudioMonitor: MDM, playing,device:5 lapse:10
09-02 18:32:31.965  1582  4022 I OpAudioMonitor: MDM,device:2 lapse:10 packageName:com.dummy
09-02 18:32:31.965  1582  4022 I OpAudioMonitor: MDM,stop remove start time for:com.dummy
09-02 18:32:31.984  1582  1582 D xne     : Event success
09-02 18:32:31.994 11649 22773 D CCodecBufferChannel: [c2.android.aac.decoder#891] DEBUG: elapsed: n=6 [in=0 pipeline=0 out=2 smoothness=4]
09-02 18:32:31.994 11649 22773 D PipelineWatcher: DEBUG: elapsed 2 / 6
09-02 18:32:32.072 11649 22855 D AudioTrack: ClientUid 10835 AudioTrack::stop 
09-02 18:32:32.075  1582  3387 I AS.AudioService: playerEvent: 66327 event: 4 isMusicActive:true device:2 currentPackageName:com.dummy
09-02 18:32:32.075  1582  3387 I OpAudioMonitor: MDM,stop.
09-02 18:32:32.076 11649 22855 D AudioTrack: ClientUid 10835 AudioTrack::stop 
09-02 18:32:32.078  1582  3162 I AS.AudioService: releasePlayer: 66327 currentPackageName:com.dummy
09-02 18:32:32.078  1582  3162 I OpAudioMonitor: MDM,stop.
09-02 18:32:32.080 11649 22380 D AudioTrack: set(): streamType -1, sampleRate 48000, format 0x1, channelMask 0x3, frameCount 12000, flags #0, notificationFrames 0, sessionId 30761, transferType 3, uid -1, pid -1
09-02 18:32:32.080 27610 27649 D AudioFlinger: setParameters(): io 0, keyvalue Use_Game_Ecns=off, calling pid 11649 calling uid 10835
09-02 18:32:32.080 27610 27649 E ServiceUtilities: Request requires android.permission.MODIFY_AUDIO_SETTINGS
09-02 18:32:32.087 27612 27787 D audio_hw_primary: adev_get_parameters:vr_audio_mode_on
09-02 18:32:32.087 27612 27787 I audio_hw_primary: getting vr mode to 0
09-02 18:32:32.087 27612 27787 D audio_hw_primary: adev_get_parameters: exit: returns - vr_audio_mode_on=false
09-02 18:32:32.088 27610 27610 I hash_map_utils: key: 'vr_audio_mode_on' value: ''
09-02 18:32:32.089 27610 27610 I AudioPolicyManagerCustom: VR mode is 0, switch to primary output if request is for fast|raw
09-02 18:32:32.089 27610 27610 D AudioFlinger: Client defaulted notificationFrames to 6000 for frameCount 12000
09-02 18:32:32.097 27610 27610 V audio_pcm_dump: pcm_dump_init : AF10_Track_output_29_session_30761_2ch_48000Hz 0x1
09-02 18:32:32.097 27610 27610 V audio_pcm_dump: pcm_dump_init : AF10_Track_input_29_session_30761_2ch_48000Hz 0x1
09-02 18:32:32.107 11649 22380 D AudioTrack: Uid 10835 AudioTrack::setVolume left 1.000000 right 1.000000
09-02 18:32:32.108 11649 22380 D AudioTrack: ClientUid 10835 AudioTrack::start 
09-02 18:32:32.109  1582  3387 I AS.AudioService: playerEvent: 66335 event: 2 isMusicActive:true device:2 currentPackageName:com.dummy
09-02 18:32:32.109  1582  3387 I OpAudioMonitor: MDM,start.
09-02 18:32:32.110  1582  3387 I OpAudioMonitor: MDM,start put pk:com.dummy startTime:1630587752
09-02 18:32:32.110 27610 27646 D APM_AudioPolicyManager: startOutput() output 29, stream 3, session 30761, portId 10162
09-02 18:32:32.112  5948  6368 D DetectSceneService: [run] success
09-02 18:32:32.113  5948  6368 D DetectSceneService: [run] begin
09-02 18:32:32.113 11649 11649 V MediaRouter: Selecting route: RouteInfo{ name=Phone, description=null, status=null, category=RouteCategory{ name=System types=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO  groupable=false }, supportedTypes=ROUTE_TYPE_LIVE_AUDIO ROUTE_TYPE_LIVE_VIDEO , presentationDisplay=null }
09-02 18:32:32.114  5948  9421 D DetectSceneService: [handlesocket]
09-02 18:32:32.129  1582  3387 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
09-02 18:32:32.186 11649 22766 D SurfaceUtils: connecting to surface 0x793b9b42a0, reason connectToSurface
09-02 18:32:32.186 11649 22766 I MediaCodec: [OMX.qcom.video.decoder.avc.secure] setting surface generation to 11928578
09-02 18:32:32.186 11649 22766 D SurfaceUtils: disconnecting from surface 0x793b9b42a0, reason connectToSurface(reconnect)
09-02 18:32:32.186 11649 22766 D SurfaceUtils: connecting to surface 0x793b9b42a0, reason connectToSurface(reconnect)
09-02 18:32:32.188  1332 13395 E OMX-VDEC-1080P: Extension: OMX.google.android.index.AndroidNativeBufferConsumerUsage not implemented
09-02 18:32:32.190 11649 22767 E SurfaceUtils: native window cannot handle protected buffers: the consumer should either be a hardware composer or support hardware protection
09-02 18:32:32.191 11649 22766 W MediaCodec: error setting release surface: err = -1
09-02 18:32:32.197 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory clearkey
09-02 18:32:32.200 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory wfdhdcp
09-02 18:32:32.201 11649 22380 D CryptoHal: found drm@1.0 ICryptoFactory widevine
09-02 18:32:32.204 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory clearkey
09-02 18:32:32.206 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory wfdhdcp
09-02 18:32:32.207 11649 22380 D CryptoHal: found drm@1.1 ICryptoFactory widevine
09-02 18:32:32.207 27610 27646 D APM_AudioPolicyManager: stopOutput() output 29, stream 3, session 30761, portId 10161
09-02 18:32:32.208  1331  1414 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:32.208   917  5044 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:32.209  1331  1414 W HDCPManagerAdapter: HDCPManagerAdapter::isHDCPAvailable 0
09-02 18:32:32.209   917  5044 I WVCdm   : [app] calling virtual Return<void> wvdrm::hardware::drm::V1_3::widevine::WVCryptoFactory::createPlugin(const hidl_array<uint8_t, 16> &, const hidl_vec<uint8_t> &, android::hardware::drm::V1_3::ICryptoFactory::createPlugin_cb)
09-02 18:32:32.210   917  6872 I WVCdm   : [cdm_engine.cpp(763):QuerySessionStatus] Querying session status: session_id = sid1786
09-02 18:32:32.211  1582  4022 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
09-02 18:32:32.216 11649 22859 I OMXClient: IOmx service obtained
09-02 18:32:32.216  1332 13395 I OMXMaster: makeComponentInstance(OMX.qcom.video.decoder.avc.secure) in android.hardwar process
09-02 18:32:32.218 27610 27742 V audio_pcm_dump: pcm_dump_end : 
09-02 18:32:32.218 27610 27742 V audio_pcm_dump: pcm_dump_end : 
09-02 18:32:32.221  1332 13395 E android.hardware.media.omx@1.0-service: Service not available yet
09-02 18:32:32.223  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.223  1332 13395 D PlatformConfig: getConfigStoreBool: vpp/enable=false, returning false 
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32 Config name: vidc_dec_log_in value: 0
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32 Config name: vidc_dec_log_out value: 0
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32 Config name: vidc_dec_sec_prefetch_size_internal value: 31457280
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32 Config name: vidc_dec_sec_prefetch_size_output value: 3276800
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInt32 Config name: vidc_dec_thumbnail_yuv_output value: 0
09-02 18:32:32.225  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.226  1332 13395 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.226  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.226  1332 13395 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.227  1332 13395 I OMX-VDEC-1080P: component_init: OMX.qcom.video.decoder.avc : fd=14
09-02 18:32:32.227  1332 13395 E OMX-VDEC-1080P: Unsupported output color format for c2d (2141391876)
09-02 18:32:32.227  1332 13395 E OMX-VDEC-1080P: Setting color format failed
09-02 18:32:32.230  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.230  1332 13395 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.230  1332 13395 D PlatformConfig: getInstance: Enter
09-02 18:32:32.230  1332 13395 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.230  1332 13395 I OMX-VDEC-1080P: omx_vdec::component_init() success : fd=14
09-02 18:32:32.233 11649 22767 D SurfaceUtils: disconnecting from surface 0x793b9766d0, reason pushBlankBuffersToNativeWindow
09-02 18:32:32.233 11649 22858 D SurfaceUtils: connecting to surface 0x793b9adc70, reason connectToSurface
09-02 18:32:32.234  1010  1081 E BufferQueueProducer: [SurfaceView - com.dummy/com.dummy.ott.MainActivity#0](id:3f2000061de,api:2,p:11649,c:1010) connect: already connected (cur=2 req=3)
09-02 18:32:32.234 11649 22767 D SurfaceUtils: set up nativeWindow 0x793b9766d0 for 1x1, color 0x2, rotation 0, usage 0x930
09-02 18:32:32.234 11649 22858 E SurfaceUtils: Failed to connect to surface 0x793b9adc70, err -22
09-02 18:32:32.234 11649 22858 E MediaCodec: nativeWindowConnect returned an error: Invalid argument (-22)
09-02 18:32:32.234 11649 22380 E MediaCodec: configure failed with err 0xffffffea, resetting...
09-02 18:32:32.235  1332 26916 I OMX-VDEC-1080P: omx_vdec::component_deinit() complete
09-02 18:32:32.236  1332 26916 I OMX-VDEC-1080P: Exit OMX vdec Destructor: fd=14
09-02 18:32:32.240 11649 22767 D SurfaceUtils: connecting to surface 0x793b9766d0, reason pushBlankBuffersToNativeWindow(err2)
09-02 18:32:32.241  1332 26916 I OMX-VDEC-1080P: omx_vdec::component_deinit() complete
09-02 18:32:32.245  1332 26916 I OMX-VDEC-1080P: Exit OMX vdec Destructor: fd=12
09-02 18:32:32.248 11649 22766 D SurfaceUtils: disconnecting from surface 0x793b9766d0, reason disconnectFromSurface
09-02 18:32:32.250  1582  3162 I StatusBarManagerService: onVideoChanged: using= false
09-02 18:32:32.253 11649 22859 I OMXClient: IOmx service obtained
09-02 18:32:32.253  1332 26916 I OMXMaster: makeComponentInstance(OMX.qcom.video.decoder.avc.secure) in android.hardwar process
09-02 18:32:32.257  1332 26916 E android.hardware.media.omx@1.0-service: Service not available yet
09-02 18:32:32.258  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.258  1332 26916 D PlatformConfig: getConfigStoreBool: vpp/enable=false, returning false 
09-02 18:32:32.259  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32 Config name: vidc_dec_log_in value: 0
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32 Config name: vidc_dec_log_out value: 0
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32 Config name: vidc_dec_sec_prefetch_size_internal value: 31457280
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32 Config name: vidc_dec_sec_prefetch_size_output value: 3276800
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32 Config name: vidc_dec_thumbnail_yuv_output value: 0
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.260  1332 26916 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.260  1332 26916 I OMX-VDEC-1080P: component_init: OMX.qcom.video.decoder.avc : fd=12
09-02 18:32:32.260  1332 26916 E OMX-VDEC-1080P: Unsupported output color format for c2d (2141391876)
09-02 18:32:32.260  1332 26916 E OMX-VDEC-1080P: Setting color format failed
09-02 18:32:32.263  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.263  1332 26916 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.263  1332 26916 D PlatformConfig: getInstance: Enter
09-02 18:32:32.263  1332 26916 D PlatformConfig: getInt32: Returning default
09-02 18:32:32.263  1332 26916 I OMX-VDEC-1080P: omx_vdec::component_init() success : fd=12
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer: Failed to initialize decoder: OMX.qcom.video.decoder.avc.secure
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:   java.lang.IllegalArgumentException
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.media.MediaCodec.native_configure(Native Method)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.media.MediaCodec.configure(MediaCodec.java:2128)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.media.MediaCodec.configure(MediaCodec.java:2044)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:50)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1142)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1049)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:606)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:2163)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processEndOfStream(MediaCodecRenderer.java:2038)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1871)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:945)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:478)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.os.Handler.dispatchMessage(Handler.java:102)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.os.Looper.loop(Looper.java:245)
09-02 18:32:32.267 11649 22380 W MediaCodecRenderer:       at android.os.HandlerThread.run(HandlerThread.java:67)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal: Playback error
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:   com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(video/avc1/3, null, null, video/avc, avc1.4D401F, 1462520, null, [768, 432, 29.97], [-1, -1]), format_supported=YES
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:555)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:245)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:   Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc.secure, Format(video/avc1/3, null, null, video/avc, avc1.4D401F, 1462520, null, [768, 432, 29.97], [-1, -1])
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1056)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:606)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:2163)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.processEndOfStream(MediaCodecRenderer.java:2038)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1871)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:945)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:478)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       ... 3 more
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:   Caused by: java.lang.IllegalArgumentException
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.media.MediaCodec.native_configure(Native Method)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.media.MediaCodec.configure(MediaCodec.java:2128)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at android.media.MediaCodec.configure(MediaCodec.java:2044)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:50)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1142)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1049)
09-02 18:32:32.269 11649 22380 E ExoPlayerImplInternal:       ... 10 more
09-02 18:32:32.271 11649 22380 D AudioTrack: ClientUid 10835 AudioTrack::pause 
09-02 18:32:32.271  1332 26916 I OMX-VDEC-1080P: omx_vdec::component_deinit() complete

Thanks,

@icbaker
Copy link
Collaborator

icbaker commented Sep 3, 2021

Thanks for the ad tag, I can reproduce the problem in the ExoPlayer demo app on a OnePlus AC2003.

With MediaItem.Builder#setDrmSessionForClearPeriods(false) I see the failure when transitioning from content into the first mid-roll ad.

With MediaItem.Builder#setDrmSessionForClearPeriods(true) I see the failure at the end of the pre-roll ad when transitioning into content.

I suspect (haven't debugged in detail) that the reason MediaItem.Builder#setDrmSessionForClearPeriods(true) still causes a failure (but earlier in playback) is because the secure decoder that's configured for the pre-roll ad isn't capable of decoding the content (perhaps the content is a higher resolution, or a different codec profile). This means we have to release the decoder and re-initialize it, which is what the workaround is trying to avoid.

If you remove the pre-roll the workaround should help. In that case the decoder will be configured for the content, so when the lower-resolution/profile mid-roll ad is played the same decoder can be re-used.

This is the same as the situation described in #8696 (comment).

@icbaker
Copy link
Collaborator

icbaker commented Sep 3, 2021

Duplicate of #8696

@icbaker icbaker marked this as a duplicate of #8696 Sep 3, 2021
@icbaker icbaker closed this as completed Sep 3, 2021
@google google locked and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants