summaryrefslogtreecommitdiff
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-03-25 21:23:54 -0300
committerJames Almer <jamrial@gmail.com>2018-03-27 11:25:57 -0300
commitd205c8f3bbdebd4c2396f68e91066e0195ad5e6c (patch)
tree390c66ad75ac1859d606e4bdd758707dc73650a8 /libavcodec/avpacket.c
parent3914c8e0e6bac4ce3b3573c6fd3098e2aa4c9ff5 (diff)
avcodec/avpacket: remove unnecessary check in av_packet_make_writable()
Zero sized packets are already handled below in the function. This is more in line with av_packet_ref(). Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 0693ca6f62..0993481961 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -660,9 +660,6 @@ int av_packet_make_writable(AVPacket *pkt)
if (pkt->buf && av_buffer_is_writable(pkt->buf))
return 0;
- if (!pkt->data)
- return AVERROR(EINVAL);
-
ret = packet_alloc(&buf, pkt->size);
if (ret < 0)
return ret;