summaryrefslogtreecommitdiff
path: root/src/plugins/previewopus_extractor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/previewopus_extractor.c')
-rw-r--r--src/plugins/previewopus_extractor.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/plugins/previewopus_extractor.c b/src/plugins/previewopus_extractor.c
index a47cdbc..45ea420 100644
--- a/src/plugins/previewopus_extractor.c
+++ b/src/plugins/previewopus_extractor.c
@@ -280,11 +280,7 @@ init_packet (AVPacket *packet)
static int
init_input_frame (AVFrame **frame)
{
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
*frame = av_frame_alloc ();
-#else
- *frame = avcodec_alloc_frame ();
-#endif
if (NULL == *frame)
{
#if DEBUG
@@ -694,12 +690,7 @@ cleanup:
av_freep (&converted_input_samples[0]);
free (converted_input_samples);
}
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
av_frame_free (&input_frame);
-#else
- avcodec_free_frame (&input_frame);
-#endif
-
return ret;
}
@@ -716,11 +707,7 @@ init_output_frame (AVFrame **frame,
int error;
/** Create a new frame to store the audio samples. */
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
*frame = av_frame_alloc ();
-#else
- *frame = avcodec_alloc_frame ();
-#endif
if (NULL == *frame)
{
#if DEBUG
@@ -753,11 +740,7 @@ init_output_frame (AVFrame **frame,
fprintf (stderr, "Could allocate output frame samples (error '%s')\n",
get_error_text (error));
#endif
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
av_frame_free (frame);
-#else
- avcodec_free_frame (frame);
-#endif
return error;
}
@@ -846,11 +829,7 @@ load_encode_and_write (AVAudioFifo *fifo,
#if DEBUG
fprintf (stderr, "Could not read data from FIFO\n");
#endif
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
av_frame_free (&output_frame);
-#else
- avcodec_free_frame (&output_frame);
-#endif
return AVERROR_EXIT;
}
@@ -858,18 +837,10 @@ load_encode_and_write (AVAudioFifo *fifo,
if (encode_audio_frame (output_frame, output_format_context,
output_codec_context, &data_written))
{
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
av_frame_free (&output_frame);
-#else
- avcodec_free_frame (&output_frame);
-#endif
return AVERROR_EXIT;
}
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
av_frame_free (&output_frame);
-#else
- avcodec_free_frame (&output_frame);
-#endif
return 0;
}
@@ -990,11 +961,7 @@ extract_audio (struct EXTRACTOR_ExtractContext *ec)
return;
}
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1)
frame = av_frame_alloc ();
-#else
- frame = avcodec_alloc_frame ();
-#endif
if (NULL == frame)
{
#if DEBUG
@@ -1199,7 +1166,6 @@ EXTRACTOR_previewopus_extract_method (struct EXTRACTOR_ExtractContext *ec)
ssize_t iret;
void *data;
-
if (-1 == (iret = ec->read (ec->cls,
&data,
16 * 1024)))