avdevice/xcbgrab: stop using av_init_packet()

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2021-01-29 13:28:42 -03:00
parent 6b3a563b10
commit 54cb30ce64

View File

@ -186,8 +186,6 @@ static int xcbgrab_frame(AVFormatContext *s, AVPacket *pkt)
data = xcb_get_image_data(img);
length = xcb_get_image_data_length(img);
av_init_packet(pkt);
pkt->buf = av_buffer_create(data, length, xcbgrab_image_reply_free, img, 0);
if (!pkt->buf) {
free(img);
@ -303,8 +301,6 @@ static int xcbgrab_frame_shm(AVFormatContext *s, AVPacket *pkt)
free(img);
av_init_packet(pkt);
pkt->buf = buf;
pkt->data = buf->data;
pkt->size = c->frame_size;