Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2013-04-23 10:41:28 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-04-23 10:41:28 +0400
commit1bf32bb5ac1b55c5c383024426bb0adad72a95a8 (patch)
tree6b2c91a2a5f4ab7c4bb8bbd85cf028d8fde7c0b2 /src/opus_demo.c
parentf77410deb6922e8f557d6b53d9102763c4d28158 (diff)
Fixes FEC issues introduced in 7fcd66c
This left FEC disabled on the decoder side for all cases except concatenated packets. Also fixes a FEC bug in opus_demo (wrong output buffer size calculation).
Diffstat (limited to 'src/opus_demo.c')
-rw-r--r--src/opus_demo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/opus_demo.c b/src/opus_demo.c
index a0acb0cd..4c644022 100644
--- a/src/opus_demo.c
+++ b/src/opus_demo.c
@@ -737,9 +737,11 @@ int main(int argc, char *argv[])
if( use_inbandfec ) {
if( lost_prev ) {
/* attempt to decode with in-band FEC from next packet */
+ opus_decoder_ctl(dec, OPUS_GET_LAST_PACKET_DURATION(&output_samples));
output_samples = opus_decode(dec, lost ? NULL : data[toggle], len[toggle], out, output_samples, 1);
} else {
/* regular decode */
+ output_samples = max_frame_size;
output_samples = opus_decode(dec, data[1-toggle], len[1-toggle], out, output_samples, 0);
}
} else {