qt-faststart: dont allocate a bigger buffer than needed
[ffmpeg.git] / tools / missing_codec_desc
1 #!/bin/sh
2
3 srcdir=${0%/*}/..
4
5 while read -r field equal value; do
6   case "$field $equal" in
7     ".id =")
8       eval "known_${value%,}=1"
9       ;;
10   esac
11 done < $srcdir/libavcodec/codec_desc.c
12
13 known_AV_CODEC_ID_NONE=1
14 known_AV_CODEC_ID_FIRST_AUDIO=1
15 known_AV_CODEC_ID_FIRST_SUBTITLE=1
16 known_AV_CODEC_ID_FIRST_UNKNOWN=1
17 known_AV_CODEC_ID_TTF=1
18 known_AV_CODEC_ID_PROBE=1
19 known_AV_CODEC_ID_MPEG2TS=1
20 known_AV_CODEC_ID_MPEG4SYSTEMS=1
21 known_AV_CODEC_ID_FFMETADATA=1
22
23 in=0
24 while read -r line; do
25   case "$in-$line" in
26     0-"enum AVCodecID"*) in=1;;
27     1-*"};"*)            in=0;;
28     1-*AV_CODEC_ID_*,*)
29       cid="${line%%[, =]*}"
30       eval "known=\$known_$cid"
31       case "$known" in
32         1) ;;
33         *) echo "$cid missing";;
34       esac
35       ;;
36   esac
37 done < $srcdir/libavcodec/avcodec.h