mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 11:44:49 +00:00
lavf: fix style for avformat_alloc_output_context2()
More consistent/readable.
This commit is contained in:
parent
5ecdfd008b
commit
5045786b7e
@ -2754,14 +2754,14 @@ int av_set_parameters(AVFormatContext *s, AVFormatParameters *ap)
|
||||
int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *oformat,
|
||||
const char *format, const char *filename)
|
||||
{
|
||||
AVFormatContext *s= avformat_alloc_context();
|
||||
AVFormatContext *s = avformat_alloc_context();
|
||||
int ret = 0;
|
||||
|
||||
*avctx = NULL;
|
||||
if(!s)
|
||||
if (!s)
|
||||
goto nomem;
|
||||
|
||||
if(!oformat){
|
||||
if (!oformat) {
|
||||
if (format) {
|
||||
oformat = av_guess_format(format, NULL, NULL);
|
||||
if (!oformat) {
|
||||
@ -2774,13 +2774,13 @@ int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *ofor
|
||||
if (!oformat) {
|
||||
ret = AVERROR(EINVAL);
|
||||
av_log(s, AV_LOG_ERROR, "Unable to find a suitable output format for '%s'\n",
|
||||
filename);
|
||||
filename);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s->oformat= oformat;
|
||||
s->oformat = oformat;
|
||||
if (s->oformat->priv_data_size > 0) {
|
||||
s->priv_data = av_mallocz(s->oformat->priv_data_size);
|
||||
if (!s->priv_data)
|
||||
@ -2792,7 +2792,7 @@ int avformat_alloc_output_context2(AVFormatContext **avctx, AVOutputFormat *ofor
|
||||
} else
|
||||
s->priv_data = NULL;
|
||||
|
||||
if(filename)
|
||||
if (filename)
|
||||
av_strlcpy(s->filename, filename, sizeof(s->filename));
|
||||
*avctx = s;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user