OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
169 stars 55 forks source link

Fix: error handling in parsing sample freq in FFmpeg audio plugins #984

Closed ko80 closed 2 months ago

ko80 commented 2 months ago

Commit 065923f3f768 ("Refactor FFmpeg audio plugin sample rate parsing") added a helper function for parsing the sample frequency. However, the error returned from the function was checked incorrectly (inverted). This led to a segmentation fault when starting FFmpeg with MTL audio plugins.

This commit fixes the error handling by checking if the return value is non zero.

Fixes: 065923f3f768 ("Refactor FFmpeg audio plugin sample rate parsing")

Change-type: DefectResolution

DawidWesierski4 commented 2 months ago

lgtm

DawidWesierski4 commented 2 months ago

Just a small comment Probably we should imperative mode in commit messages

IMO its readable enough though

ko80 commented 2 months ago

Just a small comment Probably we should imperative mode in commit messages

IMO its readable enough though

Agreed on using an appropriate style of commit messages in imperative mode in the future commits. This one goes as it is.