From: Marton Balint <cus@passwd.hu> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 1/1] librtmp: use AVBPrint instead of char * Date: Tue, 19 Apr 2022 00:06:36 +0200 (CEST) Message-ID: <5b56c33-aa75-9f2e-f5b-a7dcc36942e9@passwd.hu> (raw) In-Reply-To: <c84b925-feb4-747c-9956-a583f6f4f0f2@martin.st> On Sat, 16 Apr 2022, Martin Storsjö wrote: > On Fri, 15 Apr 2022, Tristan Matthews wrote: > >> This avoids having to do one pass to calculate the full length to allocate >> followed by a second pass to actually append values. >> --- >> libavformat/librtmp.c | 124 +++++++++++------------------------------- >> 1 file changed, 33 insertions(+), 91 deletions(-) >> >> diff --git a/libavformat/librtmp.c b/libavformat/librtmp.c >> index 43013e46e0..b7e9fc81cf 100644 >> --- a/libavformat/librtmp.c >> +++ b/libavformat/librtmp.c >> @@ -25,6 +25,7 @@ >> */ >> >> #include "libavutil/avstring.h" >> +#include "libavutil/bprint.h" >> #include "libavutil/mathematics.h" >> #include "libavutil/opt.h" >> #include "avformat.h" >> @@ -38,6 +39,7 @@ >> >> typedef struct LibRTMPContext { >> const AVClass *class; >> + AVBPrint filename; >> RTMP rtmp; >> char *app; >> char *conn; >> @@ -50,7 +52,6 @@ typedef struct LibRTMPContext { >> char *pageurl; >> char *client_buffer_time; >> int live; >> - char *temp_filename; >> int buffer_size; >> } LibRTMPContext; > > This looks ok to me. > > (I guess it also could be considered viable to not store the AVBprint in the > context but detach an allocated string instead; that would decrease the > persistent allocation size a little, at the cost of some more copying, but > the difference is probably negligible, so this probably is sensible as is.) Agreed. > > Let's still wait for Marton's review too. LGTM as well. Thanks. Marton _______________________________________________ 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".
next prev parent reply other threads:[~2022-04-18 22:06 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-06 5:11 [FFmpeg-devel] [PATCH 1/1] librtmp: make flashVer case consistent Tristan Matthews 2022-04-09 18:45 ` Marton Balint 2022-04-11 15:48 ` Tristan Matthews 2022-04-11 15:49 ` [FFmpeg-devel] [PATCH 1/1] librtmp: use AVBPrint instead of char * Tristan Matthews 2022-04-13 8:52 ` Martin Storsjö 2022-04-13 19:39 ` Marton Balint 2022-04-13 20:02 ` Martin Storsjö 2022-04-15 11:51 ` Tristan Matthews 2022-04-15 11:53 ` Tristan Matthews 2022-04-16 20:06 ` Martin Storsjö 2022-04-18 22:06 ` Marton Balint [this message] 2022-04-19 20:22 ` Martin Storsjö
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=5b56c33-aa75-9f2e-f5b-a7dcc36942e9@passwd.hu \ --to=cus@passwd.hu \ --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