0

FFmpeg サイトのサンプル ソース コード (muxing.c) を変更しています。古い関数を新しい関数に変更し、コードをビルドしようとしました。次に、AVPicture が非推奨と宣言されたといういくつかのエラーがあります。

インターネットでいくつかの調査を行いましたが、それを修正する方法の答えが見つかりませんでした。

/* 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);
}
4

2 に答える 2

-1

コンパイラの動作を変更するだけです

これとともに

+#pragma warning(無効:4996)

一時的な解決策にすぎない可能性があります

于 2016-04-12T05:27:02.980 に答える