]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/avpacket: remove unnecessary check in av_packet_make_writable()
authorJames Almer <jamrial@gmail.com>
Mon, 26 Mar 2018 00:23:54 +0000 (21:23 -0300)
committerJames Almer <jamrial@gmail.com>
Tue, 27 Mar 2018 14:25:57 +0000 (11:25 -0300)
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>
libavcodec/avpacket.c

index 0693ca6f62f586a49fa8a47d4c49b96a23232487..09934819613d71f87bda9649c68824f122c3308b 100644 (file)
@@ -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;