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

Clément Bœsch ubitux at gmail.com
Tue Oct 2 21:37:56 CEST 2012


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?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121002/628278c4/attachment.asc>


More information about the ffmpeg-devel mailing list