ffmpeg | branch: master | Viraaj Raulgaonkar <viraajraulg...@gmail.com> | Mon Feb 3 10:12:57 2025 +0530| [081c865867beaa43b9f3506613e165c8594f3f28] | committer: Michael Niedermayer
avformat/riffdec: change declaration of ff_get_wav_header() Change the type of logctx from void* to AVFormatContext*. This is in preparation for the next commit. Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=081c865867beaa43b9f3506613e165c8594f3f28 --- libavformat/riff.h | 2 +- libavformat/riffdec.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavformat/riff.h b/libavformat/riff.h index a93eadfeca..0b01b1fd20 100644 --- a/libavformat/riff.h +++ b/libavformat/riff.h @@ -67,7 +67,7 @@ void ff_put_bmp_header(AVIOContext *pb, AVCodecParameters *par, int for_asf, int int ff_put_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int flags); enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps); -int ff_get_wav_header(void *logctx, AVIOContext *pb, AVCodecParameters *par, +int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian); extern const AVCodecTag ff_codec_bmp_tags[]; // exposed through avformat_get_riff_video_tags() diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c index b7a85a6ab2..2b269b1682 100644 --- a/libavformat/riffdec.c +++ b/libavformat/riffdec.c @@ -92,14 +92,14 @@ static void parse_waveformatex(void *logctx, AVIOContext *pb, AVCodecParameters } /* "big_endian" values are needed for RIFX file format */ -int ff_get_wav_header(void *logctx, AVIOContext *pb, +int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par, int size, int big_endian) { int id, channels = 0, ret; uint64_t bitrate = 0; if (size < 14) { - avpriv_request_sample(logctx, "wav header size < 14"); + avpriv_request_sample(s, "wav header size < 14"); return AVERROR_INVALIDDATA; } @@ -140,18 +140,18 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb, if (size >= 18 && id != 0x0165) { /* We're obviously dealing with WAVEFORMATEX */ int cbSize = avio_rl16(pb); /* cbSize */ if (big_endian) { - avpriv_report_missing_feature(logctx, "WAVEFORMATEX support for RIFX files"); + avpriv_report_missing_feature(s, "WAVEFORMATEX support for RIFX files"); return AVERROR_PATCHWELCOME; } size -= 18; cbSize = FFMIN(size, cbSize); if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */ - parse_waveformatex(logctx, pb, par); + parse_waveformatex(s, pb, par); cbSize -= 22; size -= 22; } if (cbSize > 0) { - ret = ff_get_extradata(logctx, par, pb, cbSize); + ret = ff_get_extradata(s, par, pb, cbSize); if (ret < 0) return ret; size -= cbSize; @@ -164,7 +164,7 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb, int nb_streams, i; size -= 4; - ret = ff_get_extradata(logctx, par, pb, size); + ret = ff_get_extradata(s, par, pb, size); if (ret < 0) return ret; nb_streams = AV_RL16(par->extradata + 4); @@ -180,7 +180,7 @@ int ff_get_wav_header(void *logctx, AVIOContext *pb, par->bit_rate = bitrate; if (par->sample_rate <= 0) { - av_log(logctx, AV_LOG_ERROR, + av_log(s, AV_LOG_ERROR, "Invalid sample rate: %d\n", par->sample_rate); return AVERROR_INVALIDDATA; } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".