1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

rtpdec_hevc: Drop extra sanity check for size of input packet

In this case len is always at least 3, since it is checked against
RTP_HEVC_PAYLOAD_HEADER_SIZE + 1 before entering the switch block.

Bug-Id: CID 1238784
This commit is contained in:
Vittorio Giovara 2015-03-08 23:42:59 +00:00
parent 46d4d85759
commit bfeb83a8b7

View File

@ -245,14 +245,6 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx
case 39:
/* single NAL unit packet */
default:
/* sanity check for size of input packet: 1 byte payload at least */
if (len < 1) {
av_log(ctx, AV_LOG_ERROR,
"Too short RTP/HEVC packet, got %d bytes of NAL unit type %d\n",
len, nal_type);
return AVERROR_INVALIDDATA;
}
/* create A/V packet */
if ((res = av_new_packet(pkt, sizeof(start_sequence) + len)) < 0)
return res;