[FFmpeg-devel] [PATCH] framecrcenc: print flags and side data elements

Michael Niedermayer michaelni at gmx.at
Tue Oct 2 22:10:25 CEST 2012


On Tue, Oct 02, 2012 at 09:37:56PM +0200, Clément Bœsch wrote:
> On Tue, Oct 02, 2012 at 09:23:43PM +0200, Michael Niedermayer wrote:
> > The new fields are only printed when they differ from their defaults
> > this way only few fate refs change
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavformat/framecrcenc.c     |    8 +-
> >  tests/ref/fate/d-cinema-demux |    2 +-
> >  tests/ref/fate/lmlm4-demux    |  168 +++++++++++------------
> >  tests/ref/fate/mtv            |    2 +-
> >  tests/ref/fate/mxf-demux      |  170 +++++++++++------------
> >  tests/ref/fate/nc-demux       |  176 ++++++++++++------------
> >  tests/ref/fate/nsv-demux      |  108 +++++++--------
> >  tests/ref/fate/paf-demux      |  300 ++++++++++++++++++++---------------------
> >  tests/ref/fate/redcode-demux  |    2 +-
> >  tests/ref/fate/wmv8-drm-nodec |  256 +++++++++++++++++------------------
> >  tests/ref/fate/wtv-demux      |   78 +++++------
> >  tests/ref/fate/xmv-demux      |  174 ++++++++++++------------
> >  12 files changed, 725 insertions(+), 719 deletions(-)
> > 
> > diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
> > index b17c922..8a69748 100644
> > --- a/libavformat/framecrcenc.c
> > +++ b/libavformat/framecrcenc.c
> > @@ -20,6 +20,7 @@
> >   */
> >  
> >  #include "libavutil/adler32.h"
> > +#include "libavutil/avstring.h"
> >  #include "avformat.h"
> >  #include "internal.h"
> >  
> > @@ -28,8 +29,13 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
> >      uint32_t crc = av_adler32_update(0, pkt->data, pkt->size);
> >      char buf[256];
> >  
> > -    snprintf(buf, sizeof(buf), "%d, %10"PRId64", %10"PRId64", %8d, %8d, 0x%08x\n",
> > +    snprintf(buf, sizeof(buf), "%d, %10"PRId64", %10"PRId64", %8d, %8d, 0x%08x",
> >               pkt->stream_index, pkt->dts, pkt->pts, pkt->duration, pkt->size, crc);
> > +    if (pkt->flags != AV_PKT_FLAG_KEY)
> > +        av_strlcatf(buf, sizeof(buf), ", F=0x%0X", pkt->flags);
> > +    if (pkt->side_data_elems)
> > +        av_strlcatf(buf, sizeof(buf), ", S=%d", pkt->side_data_elems);
> > +    av_strlcatf(buf, sizeof(buf), "\n");
> 
> Looks useful, but unless I'm mistaken, 'S=' doesn't seem to appear in any
> test; normal?

probably normal

if it appears somewhere in a test then we should also print CRCs for
the side data elements

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121002/af89e4ba/attachment.asc>


More information about the ffmpeg-devel mailing list