diff options
Diffstat (limited to 'src/plugins/previewopus_extractor.c')
-rw-r--r-- | src/plugins/previewopus_extractor.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/previewopus_extractor.c b/src/plugins/previewopus_extractor.c index 0b9ab0b..9423dcd 100644 --- a/src/plugins/previewopus_extractor.c +++ b/src/plugins/previewopus_extractor.c | |||
@@ -232,6 +232,7 @@ open_output_file ( | |||
232 | #if DEBUG | 232 | #if DEBUG |
233 | fprintf (stderr, "Could not find output file format\n"); | 233 | fprintf (stderr, "Could not find output file format\n"); |
234 | #endif | 234 | #endif |
235 | error = AVERROR (ENOSYS); | ||
235 | goto cleanup; | 236 | goto cleanup; |
236 | } | 237 | } |
237 | 238 | ||
@@ -241,6 +242,7 @@ open_output_file ( | |||
241 | #if DEBUG | 242 | #if DEBUG |
242 | fprintf (stderr, "Could not find an OPUS encoder.\n"); | 243 | fprintf (stderr, "Could not find an OPUS encoder.\n"); |
243 | #endif | 244 | #endif |
245 | error = AVERROR (ENOSYS); | ||
244 | goto cleanup; | 246 | goto cleanup; |
245 | } | 247 | } |
246 | 248 | ||
@@ -1061,8 +1063,8 @@ extract_audio (struct EXTRACTOR_ExtractContext *ec) | |||
1061 | } | 1063 | } |
1062 | else | 1064 | else |
1063 | { | 1065 | { |
1064 | #if DEBUG | ||
1065 | duration = format_ctx->duration; | 1066 | duration = format_ctx->duration; |
1067 | #if DEBUG | ||
1066 | fprintf (stderr, | 1068 | fprintf (stderr, |
1067 | "Duration: %lld\n", | 1069 | "Duration: %lld\n", |
1068 | format_ctx->duration); | 1070 | format_ctx->duration); |
@@ -1131,7 +1133,8 @@ extract_audio (struct EXTRACTOR_ExtractContext *ec) | |||
1131 | * If we have enough samples for the encoder, we encode them. | 1133 | * If we have enough samples for the encoder, we encode them. |
1132 | * At the end of the file, we pass the remaining samples to | 1134 | * At the end of the file, we pass the remaining samples to |
1133 | * the encoder. | 1135 | * the encoder. |
1134 | */while (av_audio_fifo_size (fifo) >= output_frame_size || | 1136 | */// |
1137 | while (av_audio_fifo_size (fifo) >= output_frame_size || | ||
1135 | (finished && av_audio_fifo_size (fifo) > 0)) | 1138 | (finished && av_audio_fifo_size (fifo) > 0)) |
1136 | { | 1139 | { |
1137 | /** | 1140 | /** |
@@ -1201,10 +1204,8 @@ cleanup: | |||
1201 | if (output_codec_context) | 1204 | if (output_codec_context) |
1202 | avcodec_close (output_codec_context); | 1205 | avcodec_close (output_codec_context); |
1203 | 1206 | ||
1204 | if (codec_ctx) | 1207 | avcodec_close (codec_ctx); |
1205 | avcodec_close (codec_ctx); | 1208 | avformat_close_input (&format_ctx); |
1206 | if (format_ctx) | ||
1207 | avformat_close_input (&format_ctx); | ||
1208 | av_free (io_ctx); | 1209 | av_free (io_ctx); |
1209 | } | 1210 | } |
1210 | 1211 | ||