[Libav-user] av_read_frame returns -32

Bob Self bobslf at gmail.com
Sat Mar 10 16:53:24 CET 2012


On Tue, Mar 6, 2012 at 10:20 AM, Bob Self <bobslf at gmail.com> wrote:
> On Tue, Mar 6, 2012 at 9:51 AM, Andrey Utkin
> <andrey.krieger.utkin at gmail.com> wrote:
>>
>> Errno=32 represents "Broken pipe".
>> Most probably it can happen if you receive source video by network protocol.
>> You didn't tell what is the file and how you reach it from your app,
>> so above is just guess.
>>
>> --
>> Andrey Utkin
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
> The file is a .avi file on a USB3 hard drive (WD passport). Could that
> be a reason for a broken pipe? Is there a fix for this? The movie
> plays fine in VLC from the same location. The computer is a Sony Vaio
> I8.


I did find that error # -32 is EPIPE and added this to the minimal test program:

    while (!abort)  {
        status = av_read_frame(m_pFormatCtx, &packet);

        switch(status)  {
            case AVERROR(EAGAIN):
                continue;

            case AVERROR(EPIPE):
                av_free_packet(&packet);
                printf("av_read_frame error\n");
                abort = true;
                continue;

            default:
                if (status < 0) {
                    av_free_packet(&packet);
                    printf("av_read_frame error\n");
                    abort = true;
                }
                break;
        }

        ......
   }

So, the program reads about 2500 frames from the hard drive, then
fails with EPIPE. It never gets to EAGAIN or any other error. Is there
something else that a program needs to do to avoid EPIPE errors? Is
there a minimal working example of decoding video frames?


More information about the Libav-user mailing list