Reputation: 49
I am modifying example source code(muxing.c) from FFmpeg site. I changed old functions to new ones and tried to build the code. then, there are several errrors said AVPicture was declared deprecated.
I did some research on the internet but couldn't find the answer how to fix it.
/* Allocate the encoded raw picture. */
ret = avpicture_alloc(&dst_picture, c->pix_fmt, c->width, c->height);
if (ret < 0)
{
//fprintf(stderr, "Could not allocate picture: %s\n", av_err2str(ret));
char buf[256];
av_strerror(ret, buf, sizeof(buf));
printf("Could not allocate picture: %s,ret:%d\n", buf, ret);
exit(1);
}
Upvotes: 0
Views: 6596
Reputation: 617
I think it is av_image_alloc()
I also couldn't find what the replacement is and I found in the source of AVPicture that avpicture_alloc
simply calls that function.
Upvotes: 2
Reputation: 49
I just change my compiler's behaviour
with this
+#pragma warning(disable:4996)
It could be only a temporary solution
Upvotes: -1