avcodec_decode_audio3() already checks it before sending the packet to the decoder.
Attach a file by drag & drop or click to upload