[FFmpeg-devel] [PATCH] mov reference files search improvement

Maksym Veremeyenko verem
Wed Sep 2 14:54:01 CEST 2009


Diego Biurrun ???????(??):
> On Wed, Sep 02, 2009 at 02:56:38PM +0300, Maksym Veremeyenko wrote:
>> Diego Biurrun ???????(??):
>>> On Wed, Sep 02, 2009 at 01:26:11PM +0300, Maksym Veremeyenko wrote:
>>>> Diego Biurrun ???????(??):
>>>>> On Wed, Sep 02, 2009 at 09:55:32AM +0300, Maksym Veremeyenko wrote:
[...]
>> newer patch attached.
>>
>> --- libavformat/mov.c	(revision 19698)
>> +++ libavformat/mov.c	(working copy)
>> @@ -273,41 +273,72 @@
>>  
>> -                av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n", type, len);
>> +                av_log(c->fc, AV_LOG_DEBUG, "type %d, len %d\n",
>> +                       type, len);
> 
> cosmetics
rolled back

> 
>> +                } else if (type == 0) { // directory name
> 
> if (!type)
I vote to leave it unchanged, because the *type* is compared against 
constant - it not just "zero".

According to:
http://www.geocities.com/xhelmboyx/quicktime/formats/alias-layout.txt
"optional extra data strings" type are:

Extended Info End             = -1
Directory Name                =  0
Directory IDs                 =  1
Absolute Path                 =  2
AppleShare Zone Name          =  3
AppleShare Server Name        =  4
AppleShare User Name          =  5
Driver Name                   =  6
Revised AppleShare info       =  9
AppleRemoteAccess dialup info = 10

so in that case zero is just a value of constant that defines type, if 
we defined constants:

#define ALIS_DIRECTORY_NAME   0
#define ALIS_DIRECTORY_ID     1
#define ALIS_ABSOLUTE_PATH    2
[...]

the code will looks like

[...]
+                if (ALIS_ABSOLUTE_PATH == type) {
[...]
+                } else if (ALIS_DIRECTORY_NAME == type) {
[...]

May be it has a sense to defined constants for for *alis* string type? 
If yes, give me a hint for naming them.

-- 
________________________________________
Maksym Veremeyenko



More information about the ffmpeg-devel mailing list