[Libav-user] What is the meaning of return value -1 for av_interleaved_write_frame()

Li Zhang lizhang at utelisys.com
Wed Mar 21 12:16:05 CET 2012

Thanks for Kalileo and Alex,
I have found the problem, that is the problem of my customized function which using the sendto(). The -1 is returned by that.

Best regards,


From: libav-user-bounces at ffmpeg.org [libav-user-bounces at ffmpeg.org] On Behalf Of Kalileo [kalileo at universalx.net]
Sent: Wednesday, March 21, 2012 10:29 AM
To: This list is about using libavcodec, libavformat, libavutil,        libavdevice and libavfilter.
Subject: Re: [Libav-user] What is the meaning of return value -1 for    av_interleaved_write_frame()

On Mar 21, 2012, at 14:38 , Alex Cohn wrote:

> On Tue, Mar 20, 2012 at 12:32, Li Zhang <lizhang at utelisys.com> wrote:
>> The output is stream, which is send to a udp address real time using my customized output function.  The encoder is H264 and AAC. Container is TS.
>> Every time, the video frame writing will fail first and then it is audio frame.
>> Thanks!
>> Best regards,
>> Li
> I would suspect your custom output function in the first place. If as
> a result, write_packet() returns -1, or AVERROR(EPERM) - then this is
> what you get.
> Alex

Check also the DTS / PTS values in the frames you write - if they are not monotonically increasing you can get -1 too.
Libav-user mailing list
Libav-user at ffmpeg.org

More information about the Libav-user mailing list