Message ID | 20180326002511.7036-1-jamrial@gmail.com |
---|---|
State | Accepted |
Commit | d205c8f3bbdebd4c2396f68e91066e0195ad5e6c |
Headers | show |
On 3/25/2018 9:25 PM, James Almer wrote: > 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 | 3 --- > 1 file changed, 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; Applied.
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;
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 | 3 --- 1 file changed, 3 deletions(-)