From: Michael Niedermayer Date: Fri, 14 Oct 2011 01:43:24 +0000 (+0200) Subject: Merge remote-tracking branch 'qatar/master' X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=91eb1b1525456efecc3154ca533b943d2916886e;p=ffmpeg Merge remote-tracking branch 'qatar/master' * qatar/master: (22 commits) prores: add FATE tests id3v2: reduce the scope of some non-globally-used symbols/structures id3v2: cosmetics: move some declarations before the places they are used shorten: remove the flush function. shn: do not allow seeking in the raw shn demuxer. avformat: add AVInputFormat flag AVFMT_NO_BYTE_SEEK. avformat: update AVInputFormat allowed flags avformat: don't unconditionally call ff_read_frame_flush() when trying to seek. truespeech: use sizeof() instead of hardcoded sizes truespeech: remove unneeded variable, 'consumed' truespeech: simplify truespeech_read_frame() by using get_bits() truespeech: decode directly to output buffer instead of a temp buffer truespeech: check to make sure channels == 1 truespeech: check for large enough output buffer rather than truncating output truespeech: remove unneeded zero-size packet check. mlpdec: return meaningful error codes instead of -1 mlpdec: remove unnecessary wrapper function mlpdec: only calculate output size once mlpdec: validate that the reported channel count matches the actual output channel count pcm: reduce pointer type casting ... Conflicts: libavformat/avformat.h libavformat/id3v2.c libavformat/id3v2.h libavformat/utils.c libavformat/version.h Merged-by: Michael Niedermayer --- 91eb1b1525456efecc3154ca533b943d2916886e diff --cc libavcodec/pcm.c index c4928290c40,66edfba0f23..0c18e0f0d73 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@@ -438,12 -435,10 +435,12 @@@ static int pcm_decode_frame(AVCodecCont } break; default: - av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n"); + av_log(avctx, AV_LOG_ERROR, + "PCM DVD unsupported sample depth %i\n", + avctx->bits_per_coded_sample); return -1; } - samples = (short *) dst_int32_t; + samples = (uint8_t *) dst_int32_t; break; case CODEC_ID_PCM_LXF: dst_int32_t = data; diff --cc libavformat/avformat.h index c785a13ea7d,70d466e0d1e..49fe08ec60c --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@@ -274,9 -274,7 +274,10 @@@ typedef struct AVFormatParameters #define AVFMT_NOSTREAMS 0x1000 /**< Format does not require any streams */ #define AVFMT_NOBINSEARCH 0x2000 /**< Format does not allow to fallback to binary search via read_timestamp */ #define AVFMT_NOGENSEARCH 0x4000 /**< Format does not allow to fallback to generic search */ - #define AVFMT_TS_NONSTRICT 0x8000 /**< Format does not require strictly - increasing timestamps, but they must - still be monotonic */ + #define AVFMT_NO_BYTE_SEEK 0x8000 /**< Format does not allow seeking by bytes */ ++#define AVFMT_TS_NONSTRICT 0x8000000 /**< Format does not require strictly ++ increasing timestamps, but they must ++ still be monotonic */ typedef struct AVOutputFormat { const char *name; diff --cc libavformat/id3v2.c index 22a2df79e0d,c593007e876..32870648cf8 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@@ -328,6 -380,18 +388,18 @@@ finish av_dict_set(m, "date", date, 0); } + typedef struct ID3v2EMFunc { + const char *tag3; + const char *tag4; + void (*read)(AVFormatContext*, AVIOContext*, int, char*, ID3v2ExtraMeta **); - void (*free)(); ++ void (*free)(void *); + } ID3v2EMFunc; + + static const ID3v2EMFunc id3v2_extra_meta_funcs[] = { + { "GEO", "GEOB", read_geobtag, free_geobtag }, + { NULL } + }; + /** * Get the corresponding ID3v2EMFunc struct for a tag. * @param isv34 Determines if v2.2 or v2.3/4 strings are used @@@ -336,16 -400,15 +408,15 @@@ static const ID3v2EMFunc *get_extra_meta_func(const char *tag, int isv34) { int i = 0; - while (ff_id3v2_extra_meta_funcs[i].tag3) { + while (id3v2_extra_meta_funcs[i].tag3) { if (!memcmp(tag, - (isv34 ? - ff_id3v2_extra_meta_funcs[i].tag4 : - ff_id3v2_extra_meta_funcs[i].tag3), + (isv34 ? id3v2_extra_meta_funcs[i].tag4 : + id3v2_extra_meta_funcs[i].tag3), (isv34 ? 4 : 3))) - return &ff_id3v2_extra_meta_funcs[i]; + return &id3v2_extra_meta_funcs[i]; i++; } - return &ff_id3v2_extra_meta_funcs[i]; - return NULL; ++ return &id3v2_extra_meta_funcs[i]; } static void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags, ID3v2ExtraMeta **extra_meta) diff --cc libavformat/utils.c index 58982955de2,3115723668a..c7eb93f3b0c --- a/libavformat/utils.c +++ b/libavformat/utils.c @@@ -1824,12 -1767,11 +1826,13 @@@ int av_seek_frame(AVFormatContext *s, i } /* first, we try the format specific seek */ + AV_NOWARN_DEPRECATED( - if (s->iformat->read_seek) + if (s->iformat->read_seek) { + ff_read_frame_flush(s); ret = s->iformat->read_seek(s, stream_index, timestamp, flags); - else + } else ret = -1; + ) if (ret >= 0) { return 0; } diff --cc libavformat/version.h index d2f9786a0dc,53c585a06b4..fc27815f41b --- a/libavformat/version.h +++ b/libavformat/version.h @@@ -24,7 -24,7 +24,7 @@@ #include "libavutil/avutil.h" #define LIBAVFORMAT_VERSION_MAJOR 53 - #define LIBAVFORMAT_VERSION_MINOR 15 -#define LIBAVFORMAT_VERSION_MINOR 9 ++#define LIBAVFORMAT_VERSION_MINOR 16 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --cc tests/Makefile index ff0aaa0def1,1ec9dc342c3..0a3e55e9d97 --- a/tests/Makefile +++ b/tests/Makefile @@@ -40,6 -31,7 +40,7 @@@ include $(SRC_PATH)/tests/fate/fft.ma include $(SRC_PATH)/tests/fate/h264.mak include $(SRC_PATH)/tests/fate/libavutil.mak include $(SRC_PATH)/tests/fate/mp3.mak -include $(SRC_PATH)/tests/fate/prores.mak ++#include $(SRC_PATH)/tests/fate/prores.mak include $(SRC_PATH)/tests/fate/vorbis.mak include $(SRC_PATH)/tests/fate/vp8.mak