Encoder corrupted when outputing encoded packet

For the developers that use FFmpeg in Windows software.
Post Reply
Posts: 1
Joined: Mon Apr 24, 2017 2:33 am

Encoder corrupted when outputing encoded packet

Post by qidonggeng » Mon Apr 24, 2017 3:09 am

1. Running enviroment: x86 + win7 + ffmpeg-20160301-git-1c7e2cf-win32-shared.7z + x264 6b93545 + test program

2. and the test program look like this:

Code: Select all

while (1) {
    get yuv frame from file
    ret = avcodec_encode_video2(c, &pkt, yuv_frame, &got_packet);
    if (got_packet) {
        do something
3. the issue took place when:
running the test program to calling avcodec_encode_video2() about 21 times, there is no encoded pkt output (which was normal), but the 22nd calling, on the very time the avcodec_encode_video2() is going to output an encoded pkt, the avcodec_encode_video2() just quit without any warnings or errors

btw, the same test program can run well on linux, the running enviroment is:
x86 + ubuntu10.04 + ffmpeg 49fb1f6 + x264 b97ae06 + test program

Post Reply