In this case len is always at least three, since it is checked against
RTP_HEVC_PAYLOAD_HEADER_SIZE + 1 before entering the switch block.
Bug-Id: CID 1238784
---
libavformat/rtpdec_hevc.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c
index 4ec9767..ef47388 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;
--
1.9.3 (Apple Git-50)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel