avcodec/utils: Better check for channels in av_get_audio_frame_duration()