Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many deprecated warning #1

Open
arinkverma opened this issue Aug 13, 2018 · 4 comments
Open

Too many deprecated warning #1

arinkverma opened this issue Aug 13, 2018 · 4 comments

Comments

@arinkverma
Copy link

Hi @apc-llc

Against which FFmpeg version should I compiled code?

@dmikushin
Copy link
Contributor

dmikushin commented Aug 14, 2018 via email

@AndreiCherniaev
Copy link
Contributor

As you know,
avcodec_encode_video2 & avcodec_encode_audio2 seems to be deprecated. FFmpeg of Current Version (4.2) has new API: avcodec_send_frame & avcodec_receive_packet.

I suggest rewrite code base on this description. But I need help.

@dmikushin
Copy link
Contributor

But I need help.

Is there any specific difficulty or a question?

@AndreiCherniaev
Copy link
Contributor

AndreiCherniaev commented Sep 11, 2023

specific difficulty

For example I try rewrite this way, but it is a mistake... For me still not clear how use avcodec_send_frame() and avcodec_receive_packet().

    //int got_output;
    //int ret = avcodec_encode_video2(c, &pkt, yuvpic, &got_output);
    int ret = avcodec_send_frame(c, yuvpic);
    if (ret) {
        fprintf(stderr, "err avcodec_send_frame()\n");
        exit(1);
    }
    ret = avcodec_receive_packet(c, &pkt); //SIGABRT here
    if (ret) {
        fprintf(stderr, "err avcodec_receive_packet()\n");
        exit(1);
    }else
    //if (got_output)
	{
		fflush(stdout);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants