diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-26 16:55:15 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-26 17:20:48 +0400 |
commit | 9aa630a520eb985dc6eefa5bc0f96e8269265ecb (patch) | |
tree | 7b573b974d5f4622113e0798732aa4b67f49bae2 /libavformat/pcmdec.c | |
parent | 7fe6f6e2b10fe278fecea850fda1d8e321330c15 (diff) | |
parent | 6aa93689abe8c095cec9fa828c2dee3131008995 (diff) |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
configure: sanitise sparc vis check
configure: recognise more sparc variants as --cpu argument
build: Include HEADERS-yes in the HEADERS variable
pcm: change references to raw to pcm
ffv1: set the range coder state in decode_slice_header
pcmdec: change default of channels parameter to 1
Conflicts:
libavformat/pcmdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/pcmdec.c')
-rw-r--r-- | libavformat/pcmdec.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 5ed572b8f7..30f69d3ff0 100644 --- a/libavformat/pcmdec.c +++ b/libavformat/pcmdec.c @@ -28,15 +28,15 @@ #define RAW_SAMPLES 1024 -typedef struct RawAudioDemuxerContext { +typedef struct PCMAudioDemuxerContext { AVClass *class; int sample_rate; int channels; -} RawAudioDemuxerContext; +} PCMAudioDemuxerContext; -static int raw_read_header(AVFormatContext *s) +static int pcm_read_header(AVFormatContext *s) { - RawAudioDemuxerContext *s1 = s->priv_data; + PCMAudioDemuxerContext *s1 = s->priv_data; AVStream *st; st = avformat_new_stream(s, NULL); @@ -61,7 +61,7 @@ static int raw_read_header(AVFormatContext *s) return 0; } -static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) +static int pcm_read_packet(AVFormatContext *s, AVPacket *pkt) { int ret, size, bps; // AVStream *st = s->streams[0]; @@ -84,8 +84,8 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) } static const AVOption pcm_options[] = { - { "sample_rate", "", offsetof(RawAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, - { "channels", "", offsetof(RawAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "sample_rate", "", offsetof(PCMAudioDemuxerContext, sample_rate), AV_OPT_TYPE_INT, {.i64 = 44100}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, + { "channels", "", offsetof(PCMAudioDemuxerContext, channels), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, { NULL }, }; @@ -99,9 +99,9 @@ static const AVClass name_ ## _demuxer_class = { \ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \ .name = #name_, \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ - .priv_data_size = sizeof(RawAudioDemuxerContext), \ - .read_header = raw_read_header, \ - .read_packet = raw_read_packet, \ + .priv_data_size = sizeof(PCMAudioDemuxerContext), \ + .read_header = pcm_read_header, \ + .read_packet = pcm_read_packet, \ .read_seek = ff_pcm_read_seek, \ .flags = AVFMT_GENERIC_INDEX, \ .extensions = ext, \ |