gpt4 book ai didi

android - Android 内部存储的视频播放最终挂起/崩溃

转载 作者:行者123 更新时间:2023-11-30 04:46:34 27 4
gpt4 key购买 nike

我在播放 mp4 视频时遇到问题,涉及视频在播放过程中随机但一致的点卡住(随机是因为它似乎因设备而异,但一致是因为它似乎是同一个地方在给定的设备上)。有问题的视频从远程 url 下载到设备并保存到内部设备存储。由于 native VideoView 类不支持从内部存储播放视频,因此我创建了一个 VideoView 的修改版本,其中包含一个新方法,该方法接受指向相关视频文件的文件描述符。该类也已修改为将媒体播放器的数据源设置为此文件描述符。这会导致从内部设备存储播放视频,尽管会出现上述卡住问题。

从下面粘贴的 logcat 输出判断,媒体服务器崩溃似乎存在问题,可能涉及段错误。我在网上的其他地方看到过类似崩溃的堆栈痕迹,但它们似乎与相机使用有关,而不是与视频播放有关。我已经在三款不同的手机上对此进行了测试,两款运行 Android 2.2.1,第三款运行 Android 2.1。任何人都可以告诉我可能导致此问题的原因以及我如何解决或规避它吗?

WARN/InputManagerService(103): [ 01-25 14:55:48.791 9274:0x27db F/MPEG4Extractor ]
WARN/InputManagerService(103): frameworks/base/media/libstagefright/MPEG4Extractor.cpp:1595 srcOffset + mNALLengthSize <= size
INFO/DEBUG(55): * ** * ** * ** * ** * ** **
INFO/DEBUG(55): Build fingerprint: 'vodafone/vfpioneer/sapphire/sapphire:2.2.1/FRG83D/75603:user/release-keys'
INFO/DEBUG(55): pid: 9274, tid: 10203 >>> /system/bin/mediaserver <<<
INFO/DEBUG(55): signal 11 (SIGSEGV), fault addr deadbaad
INFO/DEBUG(55): r0 00000000 r1 0000000c r2 00000027 r3 00000000
INFO/DEBUG(55): r4 00000000 r5 deadbaad r6 00001728 r7 fffde6df
INFO/DEBUG(55): r8 00100000 r9 a340a1f1 10 4050a000 fp 00016db8
INFO/DEBUG(55): ip ffffffff sp 40609908 lr afd154c5 pc afd11dc4 cpsr 40000030
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
...
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
INFO/DEBUG(55): #00 pc 00011dc4 /system/lib/libc.so
INFO/DEBUG(55): #01 pc 0000135c /system/lib/liblog.so
INFO/DEBUG(55): code around pc:
INFO/DEBUG(55): afd11da4 1c2bd00b 2d00682d e026d1fb 2b0068db
INFO/DEBUG(55): afd11db4 4e17d003 51a02001 4d164798 24002227
INFO/DEBUG(55): afd11dc4 f7fb702a 2106ee14 ef10f7fc 05592380
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
INFO/DEBUG(55): afd11dd4 6091aa01 1c116054 94012006 eab6f7fc
INFO/DEBUG(55): afd11de4 2200a905 f7fc2002 f7fbeac2 2106ee00
INFO/DEBUG(55): code around lr:
INFO/DEBUG(55): afd154a4 b0834a0d 589c447b 26009001 686768a5
INFO/DEBUG(55): afd154b4 220ce008 2b005eab 1c28d003 47889901
INFO/DEBUG(55): afd154c4 35544306 d5f43f01 2c006824 b003d1ee
INFO/DEBUG(55): afd154d4 bdf01c30 0002ae7c 000000d4 1c0fb5f0
INFO/DEBUG(55): afd154e4 43551c3d a904b087 1c16ac01 604d9004
INFO/DEBUG(55): stack:
INFO/DEBUG(55): 406098c8 00000000
INFO/DEBUG(55): 406098cc 000003a0
INFO/DEBUG(55): 406098d0 afd40498 /system/lib/libc.so
INFO/DEBUG(55): 406098d4 afd41b6c /system/lib/libc.so
INFO/DEBUG(55): 406098d8 00000000
INFO/DEBUG(55): 406098dc afd154c5 /system/lib/libc.so
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
INFO/DEBUG(55): 406098e0 00000009
INFO/DEBUG(55): 406098e4 afd1450d /system/lib/libc.so
INFO/DEBUG(55): 406098e8 0000005f
INFO/DEBUG(55): 406098ec afd40328 /system/lib/libc.so
INFO/DEBUG(55): 406098f0 00000000
INFO/DEBUG(55): 406098f4 00001728
INFO/DEBUG(55): 406098f8 fffde6df
INFO/DEBUG(55): 406098fc afd147ab /system/lib/libc.so
INFO/DEBUG(55): 40609900 df002777
INFO/DEBUG(55): 40609904 e3a070ad
INFO/DEBUG(55): #00 40609908 40609904
INFO/DEBUG(55): 4060990c 00000001
INFO/DEBUG(55): 40609910 a2f89987 /system/lib/libstagefright.so
INFO/DEBUG(55): 40609914 0000000f
INFO/DEBUG(55): 40609918 4060993c
INFO/DEBUG(55): 4060991c fffffbdf
INFO/DEBUG(55): 40609920 4060993c
INFO/DEBUG(55): 40609924 a2f89987 /system/lib/libstagefright.so
INFO/DEBUG(55): 40609928 a2fab2a8 /system/lib/libstagefright.so
INFO/DEBUG(55): 4060992c afa0135f /system/lib/liblog.so
INFO/DEBUG(55): #01 40609930 4060993c
INFO/DEBUG(55): 40609934 afa0135f /system/lib/liblog.so
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
INFO/DEBUG(55): 40609938 40609d54
INFO/DEBUG(55): 4060993c 6d617266
INFO/DEBUG(55): 40609940 726f7765
INFO/DEBUG(55): 40609944 622f736b
INFO/DEBUG(55): 40609948 2f657361
INFO/DEBUG(55): 4060994c 6964656d
INFO/DEBUG(55): 40609950 696c2f61
INFO/DEBUG(55): 40609954 61747362
INFO/DEBUG(55): 40609958 72666567
INFO/DEBUG(55): 4060995c 74686769
INFO/DEBUG(55): 40609960 45504d2f
INFO/DEBUG(55): 40609964 78453447
INFO/DEBUG(55): 40609968 63617274
INFO/DEBUG(55): 4060996c 2e726f74
INFO/DEBUG(55): 40609970 3a707063
INFO/DEBUG(55): 40609974 35393531
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
...
WARN/AACDecoder(9274): AAC decoder returned error 1, substituting silence
INFO/ServiceManager(52): service 'media.audio_flinger' died
INFO/ServiceManager(52): service 'media.player' died
INFO/ServiceManager(52): service 'media.camera' died
INFO/ServiceManager(52): service 'media.audio_policy' died
WARN/IMediaDeathNotifier(10181): media server died
ERROR/MediaPlayer(10181): error (100, 0)
ERROR/MediaPlayer(10181): Error (100,0)
DEBUG/VideoView(10181): Error: 100,0
WARN/AudioSystem(103): AudioFlinger server died!
WARN/AudioSystem(103): AudioPolicyService server died!
INFO/BootReceiver(103): Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)

最佳答案

与此有关question

原因与内存不够/audioflinger service dies有关

关于android - Android 内部存储的视频播放最终挂起/崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4795885/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com