完善资料让更多小伙伴认识你,还能领取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 . */ } |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1982 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2482 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5264 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 16:17 , Processed in 0.568475 second(s), Total 73, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号