From: Paul B Mahol <onemda@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] avformat/adtsenc: do not pass NULL to av_log() Date: Thu, 27 Apr 2023 10:37:45 +0200 Message-ID: <CAPYw7P6J2FqRD638JxPPGrsd+ssK5C9OgJ8qLYJ5YhMtbHz10g@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 17 bytes --] Patch attached. [-- Attachment #2: 0001-avformat-adtsenc-do-not-pass-NULL-to-av_log.patch --] [-- Type: text/x-patch, Size: 1586 bytes --] From 4d990d87cc4df0593abeec8e398556089f1a7c0c Mon Sep 17 00:00:00 2001 From: Paul B Mahol <onemda@gmail.com> Date: Thu, 27 Apr 2023 10:35:33 +0200 Subject: [PATCH] avformat/adtsenc: do not pass NULL to av_log() Signed-off-by: Paul B Mahol <onemda@gmail.com> --- libavformat/adtsenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c index b5e9640544..c5765cc92e 100644 --- a/libavformat/adtsenc.c +++ b/libavformat/adtsenc.c @@ -127,14 +127,14 @@ static int adts_write_header(AVFormatContext *s) return 0; } -static int adts_write_frame_header(ADTSContext *ctx, +static int adts_write_frame_header(AVFormatContext *s, ADTSContext *ctx, uint8_t *buf, int size, int pce_size) { PutBitContext pb; unsigned full_frame_size = (unsigned)ADTS_HEADER_SIZE + size + pce_size; if (full_frame_size > ADTS_MAX_FRAME_BYTES) { - av_log(NULL, AV_LOG_ERROR, "ADTS frame size too large: %u (max %d)\n", + av_log(s, AV_LOG_ERROR, "frame size too large: %u (max %d)\n", full_frame_size, ADTS_MAX_FRAME_BYTES); return AVERROR_INVALIDDATA; } @@ -192,7 +192,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt) } } if (adts->write_adts) { - int err = adts_write_frame_header(adts, buf, pkt->size, + int err = adts_write_frame_header(s, adts, buf, pkt->size, adts->pce_size); if (err < 0) return err; -- 2.39.1 [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2023-04-27 8:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAPYw7P6J2FqRD638JxPPGrsd+ssK5C9OgJ8qLYJ5YhMtbHz10g@mail.gmail.com \ --to=onemda@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git