Skip to content

Commit a482ea6

Browse files
committed
refactor: 替换 av_dict_get 为 av_dict_iterate 用于提取元数据
1 parent e34ba71 commit a482ea6

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

crates/ffmpeg_audio/src/decode/demuxer.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,9 @@ unsafe fn extract_dict(dict: *mut sys::AVDictionary, map: &mut HashMap<String, S
251251
return;
252252
}
253253

254-
let mut entry = ptr::null_mut();
254+
let mut entry = ptr::null();
255255
loop {
256-
entry = unsafe {
257-
sys::av_dict_get(
258-
dict,
259-
c"".as_ptr(),
260-
entry,
261-
sys::AV_DICT_IGNORE_SUFFIX.cast_signed(),
262-
)
263-
};
264-
256+
entry = unsafe { sys::av_dict_iterate(dict, entry) };
265257
if entry.is_null() {
266258
break;
267259
}

0 commit comments

Comments
 (0)