[FFmpeg-devel] [PATCH] avformat/smoothstreamingenc: check return value of avcodec_parameters_copy()
Zhao Zhili
quinkblack at foxmail.com
Thu Nov 21 09:27:42 EET 2024
> On Nov 21, 2024, at 15:02, Marth64 <marth64 at proxyid.net> wrote:
>
> Hi Zhao Zhili:
>
>> We don’t use braces in such case generally.
>> And please split assignment and check
>> into two lines next time.
>
> I agree but was trying to fix it in the style of the
> surrounding code for consistency. The function
> mostly uses braces after single quote and
> the assignment/check pattern.
OK. It’s not a big deal. The single line with braces mostly comes
from refactor like:
if (!(st = avformat_new_stream(ctx, NULL))) {
- ret = AVERROR(ENOMEM);
- goto fail;
+ return AVERROR(ENOMEM);
}
>
> It doesn’t make it ideal but I also did not
> want to make it look awkward.
>
> Thank you
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list