[FFmpeg-devel] [PATCH] libavcodec/tests: Added test for libavcodec/avpacket.c

wm4 nfxjfg at googlemail.com
Wed Oct 26 16:03:07 EEST 2016


On Wed, 26 Oct 2016 14:56:01 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:

> On Wed, Oct 26, 2016 at 02:00:46PM +0200, wm4 wrote:
> > On Sat, 22 Oct 2016 23:40:42 -0700
> > Thomas Turner <thomastdt at googlemail.com> wrote:
> >   
> > > Function(s) Tested: av_packet_clone().
> > > 
> > > This test checks if av_packet_clone() can successfully make a copy of an AVPacket.
> > > Compares all data members in AVPacket EXCEPT for "buf" because "buf" is initialized
> > > to NIL in the original AVPacket [to be cloned].
> > > 
> > > This test also prints out the all the contents of the original and cloned AVPackets.
> > > 
> > > Signed-off-by: Thomas Turner <thomastdt at googlemail.com>
> > > ---  
> > 
> > Am I the only one who thinks this test is overly complex and worthless?
> > (Checks if each field got copied... come on, that's not useful. And
> > would probably bitrot quickly as nobody would add new fields to the
> > test anyway.)  
> 
> what do you suggest, how to test it ?
> or should we deprecate av_packet_clone()
> nothing uses it, so the total lack of tests and uses means noone
> would notice (quickly) if it broke ever
> 
> [...]

I don't think it's the choice between either adding a test
for av_packet_clone or deprecating it?

Also, av_packet_clone is 100% implemented using public functions and
doesn't access any AVPacket fields itself.


More information about the ffmpeg-devel mailing list