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

Michael Niedermayer michaelni
Sun Oct 18 22:17:47 CEST 2009


On Sun, Oct 18, 2009 at 07:49:42PM +0200, Reimar D?ffinger wrote:
> 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?

yes

and i like the output alot, commit as you see fit ...


> 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

i see no trailing whitespace :)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091018/702ed831/attachment.pgp>



More information about the ffmpeg-devel mailing list