Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
aef51507
Commit
aef51507
authored
Dec 16, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flac: only set channel layout if not previously set or on channel count change
Fixes Bug 402
parent
9378be9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
flac_parser.c
libavcodec/flac_parser.c
+5
-2
flacdec.c
libavcodec/flacdec.c
+2
-1
No files found.
libavcodec/flac_parser.c
View file @
aef51507
...
@@ -457,9 +457,12 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
...
@@ -457,9 +457,12 @@ static int get_best_header(FLACParseContext* fpc, const uint8_t **poutbuf,
check_header_mismatch
(
fpc
,
header
,
child
,
0
);
check_header_mismatch
(
fpc
,
header
,
child
,
0
);
}
}
if
(
header
->
fi
.
channels
!=
fpc
->
avctx
->
channels
||
(
!
fpc
->
avctx
->
channel_layout
&&
header
->
fi
.
channels
<=
6
))
{
fpc
->
avctx
->
channels
=
header
->
fi
.
channels
;
ff_flac_set_channel_layout
(
fpc
->
avctx
);
}
fpc
->
avctx
->
sample_rate
=
header
->
fi
.
samplerate
;
fpc
->
avctx
->
sample_rate
=
header
->
fi
.
samplerate
;
fpc
->
avctx
->
channels
=
header
->
fi
.
channels
;
ff_flac_set_channel_layout
(
fpc
->
avctx
);
fpc
->
pc
->
duration
=
header
->
fi
.
blocksize
;
fpc
->
pc
->
duration
=
header
->
fi
.
blocksize
;
*
poutbuf
=
flac_fifo_read_wrap
(
fpc
,
header
->
offset
,
*
poutbuf_size
,
*
poutbuf
=
flac_fifo_read_wrap
(
fpc
,
header
->
offset
,
*
poutbuf_size
,
&
fpc
->
wrap_buf
,
&
fpc
->
wrap_buf
,
...
...
libavcodec/flacdec.c
View file @
aef51507
...
@@ -426,7 +426,8 @@ static int decode_frame(FLACContext *s)
...
@@ -426,7 +426,8 @@ static int decode_frame(FLACContext *s)
return
ret
;
return
ret
;
}
}
s
->
channels
=
s
->
avctx
->
channels
=
fi
.
channels
;
s
->
channels
=
s
->
avctx
->
channels
=
fi
.
channels
;
ff_flac_set_channel_layout
(
s
->
avctx
);
if
(
!
s
->
avctx
->
channel_layout
&&
s
->
channels
<=
6
)
ff_flac_set_channel_layout
(
s
->
avctx
);
s
->
ch_mode
=
fi
.
ch_mode
;
s
->
ch_mode
=
fi
.
ch_mode
;
if
(
!
s
->
bps
&&
!
fi
.
bps
)
{
if
(
!
s
->
bps
&&
!
fi
.
bps
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment