aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-03-08 23:42:59 +0000
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-03-09 12:57:01 +0000
commitbfeb83a8b7d3fcf09a54d8dbc9c521e10bb17530 (patch)
treed882e6c2afbe3a20ffe5673dca5f02f8a3151485
parent46d4d8575979a24a8d026d9805039b724e0e3e5f (diff)
downloadffmpeg-bfeb83a8b7d3fcf09a54d8dbc9c521e10bb17530.tar.gz
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
-rw-r--r--libavformat/rtpdec_hevc.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c
index 4ec9767b46..ef47388ba9 100644
--- a/libavformat/rtpdec_hevc.c
+++ b/libavformat/rtpdec_hevc.c
@@ -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;