Walkaround for Error : An add-on for this website failed to run. When opening Visual C++'s Add Variable Wizard after IE 8 is ins

本程序旨在解决安装IE8后出现的“此网站的加载项未能运行”错误。通过创建新的安全区域来避免与Visual Studio等浏览器宿主应用程序的冲突。

Download: http://jiangsheng.net/Documents/IE8AddZone.zip

Prerequisite: Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)


Update: the VC team's workaround is at http://blogs.msdn.com/vcblog/archive/2009/03/28/some-vs2005-and-vs2008-wizards-pop-up-script-error.aspx. However, I still suggest copying other settings from a restricted zone before modify the 1207 key.


This program is designed to temporary circumvent the "An add-on for this web site failed to run. Check the security settings in Internet options for potential conflicts" error after installing IE8. For more details about this problem, visit https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=425510

Clicking the create button will create another Internet Explorer security zone with the id 1000 that will affect all urls not included in other zones. This will allow separate security settings for webbrowser control hosting application such as Visual Studio. If settings are copied from a trusted configuration such as "my computer",a webbrowser control hosting application may not experience the aforementioned error.

Security Remarks: do not visit unsecured web site or use email software on the same computer after creating the new zone as the security impact of the new zone is not yet tested.

If you received a fix from the IE team for this problem,please delete the zone created by this problem by clicking the delete button. visit https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=425510 for the status of this problem.

For more information about adding zones to IE, visit http://www.nthelp.com/50/addazone.htm

For more information about Internet Explorer security zones, visit http://support.microsoft.com/kb/182569

[2025-10-27 16:20:58] stm_open_mp4_v2():2063 - [STM]open file_path:/tmp/mnt/harddisk_1/20251027_161645_tp00025.mp4 [2025-10-27 16:20:58] event_play_mp4():934 - [STM]event:starttime:1761553005 endtime:1761553037 search time : 1761553005, event duration: 32 [2025-10-27 16:20:58] MP4DemuxParseAtom():2427 - [STM]video track:0,-1 [2025-10-27 16:20:58] MP4DemuxParseAtom():2164 - [STM]Track 0 marked as H.265 [2025-10-27 16:20:58] MP4DemuxParseAtom():2427 - [STM]video track:0,2 [2025-10-27 16:20:58] event_deal_next_frame():601 - [STM]pts: 0, I:1 [2025-10-27 16:21:00] event_deal_next_frame():673 - [STM]pts: 0, I:1 [2025-10-27 16:21:02] StreamTrans_SendV():891 - [Transmit]buffer full! iov_size(65105) try_send(65105) sent(23330) left(41775) [2025-10-27 16:21:28] [ERROR] event_deal_next_frame():388 - [STM]event_duration: 32, frm_pts: 33600000 [2025-10-27 16:21:28] event_stop_parse_mp4():230 - [STM]close current file, id: 25 [2025-10-27 16:21:28] StreamTrans_Take():359 - [Transmit]take errno(-5) [2025-10-27 16:21:28] HttpSession_TrySendReplyData():1354 - [HTTP]replay send(188) [2025-10-27 16:21:28] StreamTransWrap_PlaybackFinish():113 - [Transmit]playback is finished! [2025-10-27 16:21:28] StreamTrans_Take():359 - [Transmit]take errno(-1) [2025-10-27 16:21:28] [ERROR] HTTPSessionOnRecv():879 - [HTTP]TCP OnRecv() failed with error (104) [2025-10-27 16:21:28] [ERROR] HTTPSessionRecvByBuffer():921 - [HTTP]TCP Recv() socket closed. pcBuffer=[0x8dd1dc], iSize=8188 [2025-10-27 16:21:28] [ERROR] HTTPSessionExecute():5034 - [HTTP]HTTP: iGot=-4 为什么差不多的时间录的两段视频,一段能播,一段不能?[2025-10-27 16:16:46] record_thread_func():1833 - [STM](first_video_gop == TRUE) [2025-10-27 16:16:46] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:16:46] record_thread_func():2028 - [STM]avdm_get_next_block audio_call_block ret = 0 [2025-10-27 16:16:46] change_record_status():429 - [STM]rec status change: pre => recording [2025-10-27 16:16:46] record_thread_func():2133 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-27 16:16:46] record_thread_func():2217 - [STM]init_storage_data(&audio_storage_data, &audio_block, 0) [2025-10-27 16:16:46] record_thread_func():2222 - [STM]storage_data.video_codec_type =1 [2025-10-27 16:16:46] record_thread_func():2225 - [STM]storage_data.video_codec_type2 =0 [2025-10-27 16:16:46] record_thread_func():2234 - [STM]time record set time 1761553006, gop start/end time: 1761553003 ~ 1761553005, abandon [2025-10-27 16:16:46] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = -3 [2025-10-27 16:16:46] set_network_stream_enable():852 - [STM]g_record->rec_status=1 [2025-10-27 16:16:47] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-27 16:16:47] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:16:47] record_thread_func():2028 - [STM]avdm_get_next_block audio_call_block ret = 0 [2025-10-27 16:16:47] record_thread_func():2133 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-27 16:16:47] record_thread_func():2217 - [STM]init_storage_data(&audio_storage_data, &audio_block, 0) [2025-10-27 16:16:47] record_thread_func():2222 - [STM]storage_data.video_codec_type =1 [2025-10-27 16:16:47] record_t[ 98.892323] record (1403): drop_caches: 3 hread_func():2225 - [STM]storage_data.video_codec_type2 =0 [2025-10-27 16:16:47] record_thread_func():2250 - [STM]time jump, gop start_time: 1761553005, stopped time: 0 [2025-10-27 16:16:47] record_thread_func():2389 - [STM]stm_check_mp4_file_size [2025-10-27 16:16:47] record_thread_func():2499 - [STM]StgMod_Write before [2025-10-27 16:16:47] get_next_mp4_file():187 - [STM]curr_id(24) next_id(25) [2025-10-27 16:16:47] StgMod_PrepareNexFile():1258 - [STM]rename:/tmp/mnt/harddisk_1/20251026_190828_tp00025.mp4 -> /tmp/mnt/harddisk_1/20251027_161645_tp00025.mp4 [2025-10-27 16:16:47] MP4MuxInit():86 - [STM]MP4MuxSetTrackInfo, iTrackInfo=3 [2025-10-27 16:16:47] mp4_storage_mp4_init():1081 - [STM]MP4 mux context is initial, file: /tmp/mnt/harddisk_1/20251027_161645_tp00025.mp4 [2025-10-27 16:16:47] IndxMem_DeleteFile():644 - [STM]del file_id(25) events(2) [2025-10-27 16:16:47] StgMod_PrepareNexFile():1279 - [STM]curr file_id(25) name(/tmp/mnt/harddisk_1/20251027_161645_tp00025.mp4) [2025-10-27 16:16:47] drop_sys_cache():3304 - [STM]Dropped cache: 20364 kB-> 21044 kB [2025-10-27 16:16:48] MP4DemuxParseAtom():2491 - [STM]video track:0,-1 [2025-10-27 16:16:48] MP4DemuxParseAtom():2217 - [STM]Track 0 marked as H.265 [2025-10-27 16:16:48] MP4DemuxParseAtom():2491 - [STM]video track:0,2 [2025-10-27 16:16:48] MP4DemuxParseAtom():2135 - [STM]Track 2 marked as H.264 [2025-10-27 16:16:48] StgMod_CheckMp4File():1149 - [STM]MP4 file 20 valid. [2025-10-27 16:16:48] StgMod_Write():1411 - [STM]video2_data=-1330627120 [2025-10-27 16:16:48] EventCtx_NewEventCnt():461 - [STM]new event(1761553005-1761553007) det(0) tim(1) [2025-10-27 16:16:48] mp4_storage_save_mp4():438 - [STM]video2_gop_size = video2_write_buf->len=350064 [2025-10-27 16:16:48] record_thread_func():2514 - [STM]StgMod_Write [2025-10-27 16:16:48] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:16:49] [ERROR] _ctx_aging_walkaround():4267 - [AVDM]gop locked curr_time(14574) block_time(12736) (1838000000) (14) units(1) used(1) time(1761553006->1761553006) ref_cnt(1-0-1-0) is_lock(1) pts(12736830000-[12736]) size(0KB) [2025-10-27 16:16:49] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-27 16:16:49] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:16:49] record_thread_func():2028 - [STM]avdm_get_next_block audio_call_block ret = 0 [2025-10-27 16:16:49] record_thread_func():2133 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-27 16:16:49] record_thread_func():2217 - [STM]init_storage_data(&audio_storage_data, &audio_block, 0) [2025-10-27 16:16:49] record_thread_func():2222 - [STM]storage_data.video_codec_type =1 而[2025[ 208.608393] record (1410): drop_caches: 3 -10-27 16:09:41] record_thread_func():2499 - [STM]StgMod_Write before [2025-10-27 16:09:41] get_next_mp4_file():187 - [STM]curr_id(23) next_id(24) [2025-10-27 16:09:41] StgMod_PrepareNexFile():1258 - [STM]rename:/tmp/mnt/harddisk_1/20251026_184307_tp00024.mp4 -> /tmp/mnt/harddisk_1/20251027_160939_tp00024.mp4 [2025-10-27 16:09:41] MP4MuxInit():86 - [STM]MP4MuxSetTrackInfo, iTrackInfo=3 [2025-10-27 16:09:41] mp4_storage_mp4_init():1081 - [STM]MP4 mux context is initial, file: /tmp/mnt/harddisk_1/20251027_160939_tp00024.mp4 [2025-10-27 16:09:41] IndxMem_DeleteFile():644 - [STM]del file_id(24) events(2) [2025-10-27 16:09:41] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-27 16:09:41] [ERROR] _ctx_aging_walkaround():4267 - [AVDM]gop locked curr_time(23682) block_time(21882) (1799860000) (25) units(60) used(1) time(1761552579->1761552581) ref_cnt(1-0-1-0) is_lock(1) pts(21882260000-[21882]) size(343KB) [2025-10-27 16:09:41] StgMod_PrepareNexFile():1279 - [STM]curr file_id(24) name(/tmp/mnt/harddisk_1/20251027_160939_tp00024.mp4) [2025-10-27 16:09:41] drop_sys_cache():3304 - [STM]Dropped cache: 20088 kB-> 20648 kB [2025-10-27 16:09:41] MP4DemuxParseAtom():2491 - [STM]video track:0,-1 [2025-10-27 16:09:41] MP4DemuxParseAtom():2217 - [STM]Track 0 marked as H.265 [2025-10-27 16:09:41] MP4DemuxParseAtom():2491 - [STM]video track:0,2 [2025-10-27 16:09:41] StgMod_CheckMp4File():1149 - [STM]MP4 file 19 valid. [2025-10-27 16:09:41] StgMod_Write():1411 - [STM]video2_data=-1331556912 [2025-10-27 16:09:41] EventCtx_NewEventCnt():461 - [STM]new event(1761552579-1761552581) det(0) tim(1) [2025-10-27 16:09:41] mp4_storage_save_mp4():438 - [STM]video2_gop_size = video2_write_buf->len=352208 [2025-10-27 16:09:42] record_thread_func():2514 - [STM]StgMod_Write [2025-10-27 16:09:42] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:09:43] [ERROR] _ctx_aging_walkaround():4267 - [AVDM]gop locked curr_time(25483) block_time(23682) (1801690000) (26) units(1) used(1) time(1761552581->1761552581) ref_cnt(1-0-1-0) is_lock(1) pts(23682040000-[23682]) size(0KB) [2025-10-27 16:09:43] record_thread_func():1846 - [STM]avdm_get_next_block video_call_block ret = 0 [2025-10-27 16:09:43] record_thread_func():2028 - [STM]avdm_get_next_block audio_call_block ret = 0 [2025-10-27 16:09:43] record_thread_func():2133 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-27 16:09:43] record_thread_func():2217 - [STM]init_storage_data(&audio_storage_data, &audio_block, 0) [2025-10-27 16:09:43] record_thread_func():2222 - [STM]storage_data.video_codec_type =1 [2025-10-27 16:09:43] record_thread_func():2225 - [STM]storage_data.video_codec_type2 =0 [2025-10-27 16:09:43] record_thread_func():2389 - [STM]stm_check_mp4_file_size [2025-10-27 16:09:43] record_thread_func():2499 - [STM]StgMod_Write before [2025-10-27 16:09:43] StgMod_Write():1411 - [STM]video2_data=-1331556912 [2025-10-27 16:09:43] mp4_storage_save_mp4():438 - [STM]video2_gop_size = video2_write_buf->len=352656 [2025-10-27 16:09:43] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-27 16:09:43] [ERROR] _ctx_aging_walkaround():4267 - [AVDM]gop locked curr_time(25484) block_time(23682) (1802130000) (27) units(60) used(1) time(1761552581->1761552583) ref_cnt(1-0-1-0) is_lock(1) pts(23682120000-[23682]) size(344KB) ,都一样啊
10-28
[2025-10-20 16:14:59] init_storage_data_blank():1139 - [STM]init_blank_storage_data() [2025-10-20 16:14:59] record_thread_func():1798 - [STM]record_thread_func() init_blank_storage_data [2025-10-20 16:14:59] record_thread_func():1810 - [STM]storage_data.video_codec_type =1 [2025-10-20 16:14:59] record_thread_func():1812 - [STM]storage_data.video_codec_type2 =0 delay_set_cpu_scaling_max_freq to 800000, ret = 0 Monitor: ignore <NVMP_MAIN_ALIVE, 1185> because nvmp_no_restart. [2025-10-20 16:15:00] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-20 16:15:01] record_thread_func():1790 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-20 16:15:01] record_thread_func():1793 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:01] record_thread_func():1810 - [STM]storage_data.video_codec_type =1 [2025-10-20 16:15:01] record_thread_func():1812 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:02] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-20 16:15:03] record_thread_func():1665 - [STM]video gop overlap, current start_time(1760948101) [2025-10-20 16:15:03] record_thread_func():1790 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-20 16:15:03] record_thread_func():1793 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:03] record_thread_func():1810 - [STM]storage_data.video_codec_type =1 [2025-10-20 16:15:03] record_thread_func():1812 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:04] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-20 16:15:05] record_thread_func():1790 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-20 16:15:05] record_thread_func():1793 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:05] record_thread_func():1810 - [STM]storage_data.video_codec_type =1 [2025-10-20 16:15:05] record_thread_func():1812 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:06] [ERROR] _ctx_aging_walkaround():4267 - [AVDM]gop locked curr_time(16360) block_time(14550) (1809300000) (16) units(1) used(1) time(1760948104->1760948104) ref_cnt(1-0-1-0) is_lock(1) pts(14550860000-[14550]) size(0KB) [2025-10-20 16:15:06] [ERROR] on_frame_video():371 - [WEBRTC]recv I frame [2025-10-20 16:15:07] record_thread_func():1772 - [STM]carry_audio(0) future_audio(1) v(1760948103)-a(1760948105) 2 [2025-10-20 16:15:07] record_thread_func():1790 - [STM]record_thread_func() init_storage_data(&video_call_storage_data, &video_call_block, 0) [2025-10-20 16:15:07] record_thread_func():1793 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:07] record_thread_func():1810 - [STM]storage_data.video_codec_type =1 [2025-10-20 16:15:07] record_thread_func():1812 - [STM]storage_data.video_codec_type2 =0 [2025-10-20 16:15:07] record_thread_func():1837 - [STM]time jump, gop start_time: 1760948103, stopped time: 1760948105 main start timeout. 分析一下为什么四个call存进去就stopped
10-21
/** * 生产者调用,获取一个可用unit buffer并将帧内容拷贝其中填充帧头 * * @ctx: avdm上下文 * @unit: unit信息,包括帧所在的位置 */ static S32 _ctx_put_unit(avdm_context_t *ctx, unitpack_t *unitpack) { S32 ret = ERROR; U8 *base = NULL; /* 从该地址往后搜索可用buffer(可能绕圈) */ U32 tmp_len = 0; U32 unit_len = 0; /* unit需要分配的buffer的长度 */ BOOL block_start = FALSE; /* 当前unit是否为block的起始帧 */ if ((NULL == ctx) || (NULL == unitpack) || (NULL == unitpack->pack_addr[0]) || (0 == unitpack->len)) return ERROR; #ifdef VIDEO_STREAM_STATUS_CHECK if (is_local_video_type(ctx)) { video_stream_status_notify_process(ctx); } #endif pthread_rwlock_wrlock(&ctx->rwlock); if (is_local_video_type(ctx) || is_network_video_type(ctx)) { /* I帧作为GOP的起始帧 */ block_start = (unitpack->video_frame_type== TP_FRAME_TYPE_I #ifdef VIDEO_AVBR_ENABLE || unitpack->video_frame_type== TP_FRAME_TYPE_VIRTUAL_I #endif ); /* 如果是主码流的I帧,配置全局block_start */ if (AVDM_TYPE_MAIN == ctx->type && block_start) block_start_write_lock(); } else if (is_local_audio_type(ctx)) { if (g_ctx[AVDM_TYPE_MAIN] && g_ctx[AVDM_TYPE_MAIN]->state == CTX_STATE_RUNNING) { if (AVDM_BUFFER_IS_EMPTY(g_ctx[AVDM_TYPE_MAIN])) { /* 如果主码流还未收帧,丢弃先到的音频帧 */ AVDM_ERROR("drop audio frame when main queue is empty"); goto exit; } /* 如果主码流正在运行,让音频GOP与主码流进GOP进行同步 */ block_start_read_with_clear_lock(&block_start); } else { /* 环上第一帧或者每隔指定秒之后的帧 */ if (AVDM_BUFFER_IS_EMPTY(ctx) || ((unitpack->pts - ctx->ring->cur_bdesc->head_udesc->unit.pts) >= AVDM_AUDIO_GOP_TIME_SPAN_MICROSECONDS)) block_start = TRUE; else block_start = FALSE; } } else if (is_network_audio_type(ctx)) { /* 环上第一帧或者每隔指定秒之后的帧 */ if (AVDM_BUFFER_IS_EMPTY(ctx) || ((unitpack->pts - ctx->ring->cur_bdesc->head_udesc->unit.pts) >= AVDM_AUDIO_GOP_TIME_SPAN_MICROSECONDS)) { block_start = TRUE; } else { block_start = FALSE; } //AVDM_ERROR("unitpack->pts = %lld, block_start = %d", unitpack->pts, block_start); } else { AVDM_ERROR("type not supported"); ret = ERROR; goto exit; } if (block_start) { /* 锁帧老化策略 */ _ctx_aging_walkaround(ctx, unitpack->pts); /* * 在为新的block寻找空间之前,先将当前block进行打包处理, * 否则寻找可用buffer时,当前block和预录block都无法使用, * 可能会导致内存紧张,实际上最早的预录block可以释放 */ #ifndef KEEP_REST_P_FRAME ctx->drop_rest_frame = 0; #endif /* 当前block非码流首次收帧 */ if (DESC_STATE_FREE != ctx->ring->cur_bdesc->attr.state) { /* 由于音频GOP在主码流I帧时已经打包,该IF分支不会进来 */ if (DESC_STATE_FILLING == ctx->ring->cur_bdesc->attr.state) { if (AVDM_TYPE_AUDIO == ctx->type) { AVDM_ERROR("audio GOP should already packed"); } if (AVDM_TYPE_AUDIO_CALL == ctx->type) { AVDM_ERROR("audio GOP should already packed"); } /* 如果这是主码流的I帧,先将音频block打包,让主码流GOP准备好时对应的音频GOP也已经打包完毕 */ if (AVDM_TYPE_MAIN == ctx->type) { __sync_pack_audio_block(ctx); block_start_unlock(); } /* call: 如果这是avdm_call, 先将音频block打包*/ if (AVDM_TYPE_VIDEO_CALL == ctx->type) { __sync_pack_audio_call_block(ctx); block_start_unlock(); } /* 将BLOCK打包并放到已完成的环上 */ ret = __pack_block(ctx, unitpack); if (ret) AVDM_ERROR("pack block failed"); /* 更新锁定的预录block */ ret = __lock_last_pre_block(ctx); if (ret) goto exit; /* last_used block已经准备好,通知(storage)取GOP */ if (ctx->ring->last_bdesc && (DESC_STATE_OCCUPIED == ctx->ring->last_bdesc->attr.state)) __notify_block_ready(ctx); } /* 当前的block指针设为下一个可用的block */ ret = __move_to_next_block(ctx); if (ret) goto exit; #ifdef VIDEO_AVBR_ENABLE /* AVBR开启时,把真实I帧GOP引用计数加1 */ if (_avbr_get_state() && ctx->type == AVDM_TYPE_MAIN) { _lock_last_i_frame_block(ctx); } #endif } else { if (AVDM_TYPE_MAIN == ctx->type) block_start_unlock(); } /* 当前unit指针已是被使用状态,将其指向下一个可用的unit */ /* warning: 先获取下一个unit描述符再搜索可用空间,否则可用空间如果将刚完成 的GOP释放,cur_udesc实际已经放到了ulist空闲链表状态为FREE,会导致udesc 没有从空闲链表中拿出就被使用 */ if (DESC_STATE_OCCUPIED == ctx->ring->cur_udesc->attr.state) { ret = __move_to_next_unit(ctx); if (ret) goto exit; } if (AVDM_BUFFER_IS_EMPTY(ctx)) base = ctx->buffer; else base = ctx->ring->last_bdesc->block.addr + ctx->ring->last_bdesc->block.len; /* 寻找可用的block内存,如果没有会退而求其次寻找放置I帧的内存,仍然没有则丢帧 */ unit_len = ALIGN(sizeof(FRAME_HEAD_S) + unitpack->len, AVDM_FRAME_ALIGN_SIZE); ret = __get_available_buffer(ctx, base, ctx->ring->block_max_size, unit_len); if (ret) goto exit; AVDM_ERROR("avdm%d new buffer offset is %#x, available len is %#x, potiental len is %#x", ctx->type, (U32)ctx->ring->bbuffer.addr - (U32)ctx->buffer, ctx->ring->bbuffer.available_len, ctx->ring->bbuffer.potential_len); /* * 释放前一个block到新内存结尾之间覆盖到的描述符及对应内存 * 如果只释放新内存覆盖的内存,可能出现旧buffer夹在新buffer * 之间的情况,内存无法形成环状难以管理 */ ret = __free_desc_before_new_buffer(ctx, base, ctx->ring->bbuffer.addr, ctx->ring->bbuffer.available_len); if (ret) goto exit; /* 使用新的内存填充当前unit内容 */ ctx->ring->cur_udesc->unit.addr = ctx->ring->bbuffer.addr; ctx->ring->cur_udesc->unit.len = unit_len; ret = __fill_current_unit(ctx, unitpack); if (ret) goto exit; /* 根据当前unit更新当前的block信息 */ __append_unit_to_block(ctx, ctx->ring->cur_bdesc, ctx->ring->cur_udesc, unitpack->video_frame_type); ctx->ring->cur_bdesc->attr.state = DESC_STATE_FILLING; /* unit环上最新的已完成unit更新为当前unit */ ctx->ring->last_udesc = ctx->ring->cur_udesc; /* last_used unit已经准备好,通知取帧 */ __notify_unit_ready(ctx); #ifdef AVDM_PRINT_TRACE __avdm_dump(ctx); #endif } else { #ifndef KEEP_REST_P_FRAME /* 若当前P帧前面有过丢弃P帧,则后面的P帧都不再打包 */ if (is_local_video_type(ctx) && ctx->drop_rest_frame) { AVDM_ERROR("drop P frame because previous P frame was droped"); ret = ERROR; goto exit; } #endif /* avdm视频码流第一次收帧为P帧,丢弃 */ if ((is_local_video_type(ctx) || is_network_video_type(ctx)) && AVDM_BUFFER_IS_EMPTY(ctx)) { AVDM_ERROR("drop P frame when queue is empty"); ret = OK; goto exit; } /* 当前视频码流所在的block不是填充状态,丢弃P帧,一般出现在I帧被丢弃的时候 */ if ((is_local_video_type(ctx) || is_network_video_type(ctx)) && DESC_STATE_FILLING != ctx->ring->cur_bdesc->attr.state) { AVDM_ERROR("drop P frame when I frame has been dropped"); ret = OK; goto exit; } /* 当前unit指针已是被使用状态,将其指向下一个可用的unit */ if (DESC_STATE_OCCUPIED == ctx->ring->cur_udesc->attr.state) { ret = __move_to_next_unit(ctx); if (ret) goto exit; } base = ctx->ring->last_udesc->unit.addr + ctx->ring->last_udesc->unit.len; unit_len = ALIGN(sizeof(FRAME_HEAD_S) + unitpack->len, AVDM_FRAME_ALIGN_SIZE); if (ctx->ring->bbuffer.available_len < (unit_len + ctx->ring->cur_bdesc->block.len)) { /* 当前可用的长度不够放置一个P帧(音频帧),更新潜在长度并检查是否足够 */ __update_bbuffer(ctx); if (ctx->ring->bbuffer.potential_len < (unit_len + ctx->ring->cur_bdesc->block.len)) { #ifndef KEEP_REST_P_FRAME /* 丢弃当前block剩下的所有P帧,避免跳帧导致花屏 */ if (is_local_video_type(ctx)) ctx->drop_rest_frame = 1; #endif ret = ERROR; //put audio buffer to avdm failed报错主要是因为available_len和potential_len太小导致 goto exit; } else { /* 释放出新的空间,策略是在block预设最大值范围内尽可能多的释放空间 */ if (ctx->ring->bbuffer.available_len >= ctx->ring->block_max_size) { /* 当前可用空间已经不小于block预设最大值,只释放够当前新帧的空间 */ tmp_len = unit_len; } else { if (ctx->ring->bbuffer.potential_len < ctx->ring->block_max_size) { /* 潜在长度比block预设最大值要小,释放潜在长度空间 */ tmp_len = ctx->ring->bbuffer.potential_len - ctx->ring->cur_bdesc->block.len; } else { /* 潜在长度比block预设最大值要大,只释放到block预设最大值空间 */ tmp_len = ctx->ring->block_max_size - ctx->ring->cur_bdesc->block.len; } } __free_desc_within_buffer(ctx, base, tmp_len); ctx->ring->bbuffer.available_len = ctx->ring->cur_bdesc->block.len + tmp_len; } } /* 使用新的内存填充当前unit内容 */ ctx->ring->cur_udesc->unit.addr = base; ctx->ring->cur_udesc->unit.len = unit_len; ret = __fill_current_unit(ctx, unitpack); if (ret) goto exit; /* 根据当前unit更新当前的block信息 */ __append_unit_to_block(ctx, ctx->ring->cur_bdesc, ctx->ring->cur_udesc, unitpack->video_frame_type); /* unit环上最新的已完成unit更新为当前unit */ ctx->ring->last_udesc = ctx->ring->cur_udesc; /* last_used unit已经准备好,通知取帧 */ __notify_unit_ready(ctx); } exit: if (is_local_audio_type(ctx) && (g_ctx[AVDM_TYPE_MAIN] && g_ctx[AVDM_TYPE_MAIN]->state == CTX_STATE_RUNNING)) block_start_unlock(); pthread_rwlock_unlock(&ctx->rwlock); return ret; } 为什么log [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 128, current seq 128, state 0, latest seq 129 [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:51] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:11,seq:131,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:51] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:51] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:11,seq:131,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 129, current seq 129, state 0, latest seq 130 [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:51] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:12,seq:132,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:51] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:51] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:12,seq:132,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 130, current seq 130, state 0, latest seq 131 [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:51] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:13,seq:133,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:51] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:51] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:13,seq:133,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 131, current seq 131, state 0, latest seq 132 [2025-10-29 15:14:51] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] on_frame_video():448 - [WEBRTC]recv error frame [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:14,seq:134,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:14,seq:134,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 132, current seq 132, state 0, latest seq 133 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:0,seq:135,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:0,seq:135,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 133, current seq 133, state 0, latest seq 134 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:1,seq:136,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:1,seq:136,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 134, current seq 134, state 0, latest seq 135 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:2,seq:137,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:2,seq:137,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 135, current seq 135, state 0, latest seq 136 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:3,seq:138,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:3,seq:138,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 136, current seq 136, state 0, latest seq 137 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:4,seq:139,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:4,seq:139,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 137, current seq 137, state 0, latest seq 138 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:5,seq:140,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:5,seq:140,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:6,seq:141,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_unit():760 - [AVDM]Freed a unit(index:0,seq:139,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:6,seq:141,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 138, current seq 140, state 2, latest seq 140 [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2574 - [AVDM]Return lastest unit [2025-10-29 15:14:52] [ERROR] __pack_block():903 - [AVDM]avdm5 block(index:7,seq:142,unit number:1,buffer offset:0x0,buffer len:1048 Bytes) has been packed [2025-10-29 15:14:52] [ERROR] _ctx_put_unit():2219 - [AVDM]avdm5 new buffer offset is 0, available len is 0x40000, potiental len is 0x40000 [2025-10-29 15:14:52] [ERROR] __free_a_block():837 - [AVDM]Freed a avdm5 block(index:7,seq:142,unitcnt:1,offset:0x0,len:1048 Bytes) that is never been consumed [2025-10-29 15:14:52] [ERROR] _ctx_attach_next_unit():2573 - [AVDM]Stream 5: Unit Overwrite happened. cursor seq 140, current seq 140, state 0, latest seq 141 一直是这样 ?
最新发布
10-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值