[FFmpeg-devel] [PATCH] use strings for error return values in seek_test

Reimar Döffinger Reimar.Doeffinger
Sun Oct 18 19:49:42 CEST 2009


On Sat, Oct 17, 2009 at 06:32:49PM +0200, Michael Niedermayer wrote:
> On Fri, Oct 16, 2009 at 04:12:19PM +0200, Reimar D?ffinger wrote:
> > On Fri, Oct 02, 2009 at 08:58:07PM +0200, Michael Niedermayer wrote:
> > > On Fri, Oct 02, 2009 at 02:38:06PM +0200, Reimar D?ffinger wrote:
> > > > Note that it is still aligned for 0 and -1, and most of the error cases (IMO all
> > > > except those that are broken) only print this ret: part (and they were aligned before).
> > > > Apart from that it should be only a matter of changing %s to e.g. %-10s, but that would
> > > 
> > > > 1) make the already long lines even longer
> > > 
> > > theres alot that can be droped to make them shorter (the -E comes to mind)
> > > 
> > > 
> > > > 2) it will change _all_ the lines in the regressions file
> > > > I don't mind changing it, the effort is minimal but due to 2) it should be at least
> > > > in a separate patch.
> > > 
> > > of course
> > 
> > I wanted to apply this, but wanted to maybe get a quick comment if you
> > really think shortening the error names (losing some of the better
> > readability) and/or alignment really seems necessary or even useful to
> > you.
> 
> i think makeing the whole list aligned is usefull, about the -E i agree
> that its nicer if that stays ...

Ok, there is the alignment patch.
It doesn't work for AV_NOPTS_VALUE, maybe it would be better to use a similar
function as for the error return values to use "NOPTS" instead of that?
I only attach the diff for the .c files.
I think there may be a little issue, since trailing whitespace is not
allowed, and with this change the regression reference will contain
trailing whitespace as in e.g.
tests/data/b-lavf.aif
ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     54 size:  4096 flags:0
ret: 0         st:-1 flags:0  ts:-1.000000
ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     54 size:  4096 flags:0
ret: 0         st:-1 flags:1  ts: 1.894167
ret:-EOF
ret: 0         st: 0 flags:0  ts: 0.788345
ret: 0         st: 0 flags:1 dts: 0.788345 pts: 0.788345 pos:  69586 size:  4096 flags:0
ret: 0         st: 0 flags:1  ts:-0.317506
ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     54 size:  4096 flags:0
ret: 0         st:-1 flags:0  ts: 2.576668

other sample lines:
tests/data/b-lavf.gif
ret: 0         st: 0 flags:1 dts: 0.000000 pts: 0.000000 pos:     -1 size:2906382 flags:0
ret:-EINVAL    st:-1 flags:0  ts:-1.000000
ret:-EINVAL    st:-1 flags:1  ts: 1.894167

tests/data/b-lavf.gxf
ret: 0         st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos:   5024 size: 65536 flags:0
ret: 0         st:-1 flags:0  ts:-1.000000
ret: 0         st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos:   5024 size: 65536 flags:0
ret: 0         st:-1 flags:1  ts: 1.894167
ret: 0         st: 0 flags:1 dts: 0.960000 pts:-184467440737095520.000000 pos: 741640 size: 54736 flags:0
ret: 0         st: 0 flags:0  ts: 0.780000
ret: 0         st: 0 flags:0 dts: 0.800000 pts:-184467440737095520.000000 pos: 653328 size: 22148 flags:0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: seekalign.diff
Type: text/x-diff
Size: 1494 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091018/74a015ec/attachment.diff>



More information about the ffmpeg-devel mailing list