完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
LOG:
02-22 17:50:01.931 E/ROCKCHIP_VIDEO_DECCONTROL( 223): event OMX_BUFFERFLAG_EOS!!! 02-22 17:50:01.932 D/ACodec ( 5155): [OMX.rk.video_decoder.hevc] saw output EOS 02-22 17:50:01.941 I/pv_hevcdec_api( 223): pv_rkhevcdecoder_flush out 02-22 17:50:01.950 E/SampleIterator( 5155): getChunkOffset return error 02-22 17:50:01.950 W/NuMediaExtractor( 5155): read on track 0 failed with error -1004 02-22 17:50:01.964 E/SampleIterator( 5155): getChunkOffset return error 02-22 17:50:01.964 W/NuMediaExtractor( 5155): read on track 0 failed with error -1004 =================================================== Patch: media/libstagefright/FileSource.cpp | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/media/libstagefright/FileSource.cpp b/media/libstagefright/FileSource.cpp index 8005a05..73c476c 100644 --- a/media/libstagefright/FileSource.cpp +++ b/media/libstagefright/FileSource.cpp @@ -60,12 +60,34 @@ FileSource::FileSource(int fd, int64_t offset, int64_t length) mDrmBufOffset(0), mDrmBufSize(0), mDrmBuf(NULL){ - CHECK(offset >= 0); - CHECK(length >= 0); - /*Begin: 2011120903153 added by g00166974 20110603 . */ - /*Begin: 2011120903153 deleted by h00184579 20120325 for FD*/ - //mFileName = NULL; - /*End: 2011120903153 deleted by h00184579 20120325 for FD*/ + ALOGV("fd=%d, offset=%lld, length=%lld", + fd, (long long) offset, (long long) length); + + if (mOffset < 0) { + mOffset = 0; + } + if (mLength < 0) { + mLength = 0; + } + if (mLength > INT64_MAX - mOffset) { + mLength = INT64_MAX - mOffset; + } + struct stat s; + if (fstat(fd, &s) == 0) { + if (mOffset > s.st_size) { + mOffset = s.st_size; + mLength = 0; + } + if (mOffset + mLength > s.st_size) { + mLength = s.st_size - mOffset; + } + } + if (mOffset != offset || mLength != length) { + ALOGW("offset/length adjusted from %lld/%lld to %lld/%lld", + (long long) offset, (long long) length, + (long long) mOffset, (long long) mLength); + } + mIsDrmPreview = false; /*End: 2011120903153 added by g00166974 20110603 . */ } |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
739 浏览 0 评论
968 浏览 1 评论
856 浏览 1 评论
2075 浏览 1 评论
3322 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-25 13:38 , Processed in 0.580498 second(s), Total 70, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号