[FFmpeg-devel] [PATCH] Use AVERROR(ENOSYS) when it makes sense

Howard Chu hyc
Sun Apr 18 02:39:56 CEST 2010


Michael Niedermayer wrote:
> On Sat, Apr 03, 2010 at 01:46:24PM +0200, Stefano Sabatini wrote:
>> Hi, as in subject.
>> --
>> FFmpeg = Fucking and Fabulous Moronic Peaceful Elitarian Genius
>
>>   avio.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 71a210d2b465f2880ffdcac6a830ffed640659de  0002-Make-url_seek-return-AVERROR-ENOSYS-rather-than-AVER.patch
>> > From e66cec2193ee289f742120f92db17f33e7651fba Mon Sep 17 00:00:00 2001
>> From: Stefano Sabatini<stefano.sabatini-lala at poste.it>
>> Date: Tue, 16 Mar 2010 22:48:37 +0100
>> Subject: [PATCH 2/5] Make url_seek() return AVERROR(ENOSYS) rather than AVERROR(EPIPE) in
>>   the case where the seek operation is not defined in the protocol
>>   handler.
>>
>> ---
>>   libavformat/avio.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavformat/avio.c b/libavformat/avio.c
>> index af9e049..3fb64d1 100644
>> --- a/libavformat/avio.c
>> +++ b/libavformat/avio.c
>> @@ -201,7 +201,7 @@ int64_t url_seek(URLContext *h, int64_t pos, int whence)
>>       int64_t ret;
>>
>>       if (!h->prot->url_seek)
>> -        return AVERROR(EPIPE);
>> +        return AVERROR(ENOSYS);
>>       ret = h->prot->url_seek(h, pos, whence&  ~AVSEEK_FORCE);
>>       return ret;
>>   }
>> --
>> 1.7.0
>>
>
> ok

Ah, great. Then this is all fine too.

https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-April/086785.html
  (  https://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2010-April/086781.html )

All tests passed, and seeking in ffplay works.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/



More information about the ffmpeg-devel mailing list