mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: (51 commits) cin audio: use sign_extend() instead of casting to int16_t cin audio: restructure decoding loop to avoid a separate counter variable cin audio: use local variable for delta value cin audio: remove unneeded cast from void* cin audio: validate the channel count cin audio: remove unneeded AVCodecContext pointer from CinAudioContext dsicin: fix several audio-related fields in the CIN demuxer flacdec: use av_get_bytes_per_sample() to get sample size dca: handle errors from dca_decode_block() dca: return error if the frame header is invalid dca: return proper error codes instead of -1 utvideo: handle empty Huffman trees binkaudio: change short to int16_t binkaudio: only decode one block at a time. binkaudio: store interleaved overlap samples in BinkAudioContext. binkaudio: pre-calculate quantization factors binkaudio: add some buffer overread checks. atrac3: support float or int16 output using request_sample_fmt atrac3: add CODEC_CAP_SUBFRAMES capability atrac3: return appropriate error codes instead of -1 ... Conflicts: libavcodec/atrac1.c libavcodec/dca.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -131,9 +131,8 @@ static int cin_read_header(AVFormatContext *s, AVFormatParameters *ap)
|
||||
st->codec->codec_tag = 0; /* no tag */
|
||||
st->codec->channels = 1;
|
||||
st->codec->sample_rate = 22050;
|
||||
st->codec->bits_per_coded_sample = 16;
|
||||
st->codec->bits_per_coded_sample = 8;
|
||||
st->codec->bit_rate = st->codec->sample_rate * st->codec->bits_per_coded_sample * st->codec->channels;
|
||||
st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -211,7 +210,8 @@ static int cin_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
|
||||
pkt->stream_index = cin->audio_stream_index;
|
||||
pkt->pts = cin->audio_stream_pts;
|
||||
cin->audio_stream_pts += cin->audio_buffer_size * 2 / cin->file_header.audio_frame_size;
|
||||
pkt->duration = cin->audio_buffer_size - (pkt->pts == 0);
|
||||
cin->audio_stream_pts += pkt->duration;
|
||||
cin->audio_buffer_size = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user