+ if (pkt->size < 4) {
+ av_log(s, AV_LOG_ERROR, "Packet is too short\n");
+ av_free_packet(pkt);
+ return AVERROR_INVALIDDATA;
+ }
+ if (ea->audio_codec == AV_CODEC_ID_ADPCM_EA_R3)
+ pkt->duration = AV_RB32(pkt->data);
+ else
+ pkt->duration = AV_RL32(pkt->data);