mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 10:52:20 +00:00
avutil/channel_layout: add missing check for AV_CHAN_NONE in av_channel_description
Prevents printing "user -1" on invalid channel ids. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
b04f14136e
commit
e4f6fce9e0
@ -119,6 +119,8 @@ void av_channel_description_bprint(AVBPrint *bp, enum AVChannel channel_id)
|
||||
else if ((unsigned)channel_id < FF_ARRAY_ELEMS(channel_names) &&
|
||||
channel_names[channel_id].description)
|
||||
av_bprintf(bp, "%s", channel_names[channel_id].description);
|
||||
else if (channel_id == AV_CHAN_NONE)
|
||||
av_bprintf(bp, "none");
|
||||
else
|
||||
av_bprintf(bp, "user %d", channel_id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user