Zero sized packets are already handled below in the function. This is more in line with av_packet_ref().
Unified · Split
| @@ -660,9 +660,6 @@ int av_packet_make_writable(AVPacket *pkt) · 659 unmodified lines | ||
| 660 | 660 | if (pkt->buf && av_buffer_is_writable(pkt->buf)) |
| 661 | 661 | return 0; |
| 662 | 662 | |
| 663 | − if (!pkt->data) | |
| 664 | − return AVERROR(EINVAL); | |
| 665 | − | |
| 666 | 663 | ret = packet_alloc(&buf, pkt->size); |
| 667 | 664 | if (ret < 0) |
| 668 | 665 | return ret; |