History

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().

James Almer committed 8 years ago

Commit d205c8f1 parent 3914c8e1 file · +0 −3Browse files

Unified · Split

libavcodec/avpacket.c+0−3
@@ -660,9 +660,6 @@ int av_packet_make_writable(AVPacket *pkt) · 659 unmodified lines
660 if (pkt->buf && av_buffer_is_writable(pkt->buf))660 if (pkt->buf && av_buffer_is_writable(pkt->buf))
661 return 0;661 return 0;
662 662
663 if (!pkt->data)
664 return AVERROR(EINVAL);
665
666 ret = packet_alloc(&buf, pkt->size);663 ret = packet_alloc(&buf, pkt->size);
667 if (ret < 0)664 if (ret < 0)
668 return ret;665 return ret;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t