diff options
Diffstat (limited to 'src/plugins/previewopus_extractor.c')
-rw-r--r-- | src/plugins/previewopus_extractor.c | 34 |
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) | |||
280 | static int | 280 | static int |
281 | init_input_frame (AVFrame **frame) | 281 | init_input_frame (AVFrame **frame) |
282 | { | 282 | { |
283 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
284 | *frame = av_frame_alloc (); | 283 | *frame = av_frame_alloc (); |
285 | #else | ||
286 | *frame = avcodec_alloc_frame (); | ||
287 | #endif | ||
288 | if (NULL == *frame) | 284 | if (NULL == *frame) |
289 | { | 285 | { |
290 | #if DEBUG | 286 | #if DEBUG |
@@ -694,12 +690,7 @@ cleanup: | |||
694 | av_freep (&converted_input_samples[0]); | 690 | av_freep (&converted_input_samples[0]); |
695 | free (converted_input_samples); | 691 | free (converted_input_samples); |
696 | } | 692 | } |
697 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
698 | av_frame_free (&input_frame); | 693 | av_frame_free (&input_frame); |
699 | #else | ||
700 | avcodec_free_frame (&input_frame); | ||
701 | #endif | ||
702 | |||
703 | return ret; | 694 | return ret; |
704 | } | 695 | } |
705 | 696 | ||
@@ -716,11 +707,7 @@ init_output_frame (AVFrame **frame, | |||
716 | int error; | 707 | int error; |
717 | 708 | ||
718 | /** Create a new frame to store the audio samples. */ | 709 | /** Create a new frame to store the audio samples. */ |
719 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
720 | *frame = av_frame_alloc (); | 710 | *frame = av_frame_alloc (); |
721 | #else | ||
722 | *frame = avcodec_alloc_frame (); | ||
723 | #endif | ||
724 | if (NULL == *frame) | 711 | if (NULL == *frame) |
725 | { | 712 | { |
726 | #if DEBUG | 713 | #if DEBUG |
@@ -753,11 +740,7 @@ init_output_frame (AVFrame **frame, | |||
753 | fprintf (stderr, "Could allocate output frame samples (error '%s')\n", | 740 | fprintf (stderr, "Could allocate output frame samples (error '%s')\n", |
754 | get_error_text (error)); | 741 | get_error_text (error)); |
755 | #endif | 742 | #endif |
756 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
757 | av_frame_free (frame); | 743 | av_frame_free (frame); |
758 | #else | ||
759 | avcodec_free_frame (frame); | ||
760 | #endif | ||
761 | return error; | 744 | return error; |
762 | } | 745 | } |
763 | 746 | ||
@@ -846,11 +829,7 @@ load_encode_and_write (AVAudioFifo *fifo, | |||
846 | #if DEBUG | 829 | #if DEBUG |
847 | fprintf (stderr, "Could not read data from FIFO\n"); | 830 | fprintf (stderr, "Could not read data from FIFO\n"); |
848 | #endif | 831 | #endif |
849 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
850 | av_frame_free (&output_frame); | 832 | av_frame_free (&output_frame); |
851 | #else | ||
852 | avcodec_free_frame (&output_frame); | ||
853 | #endif | ||
854 | return AVERROR_EXIT; | 833 | return AVERROR_EXIT; |
855 | } | 834 | } |
856 | 835 | ||
@@ -858,18 +837,10 @@ load_encode_and_write (AVAudioFifo *fifo, | |||
858 | if (encode_audio_frame (output_frame, output_format_context, | 837 | if (encode_audio_frame (output_frame, output_format_context, |
859 | output_codec_context, &data_written)) | 838 | output_codec_context, &data_written)) |
860 | { | 839 | { |
861 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
862 | av_frame_free (&output_frame); | 840 | av_frame_free (&output_frame); |
863 | #else | ||
864 | avcodec_free_frame (&output_frame); | ||
865 | #endif | ||
866 | return AVERROR_EXIT; | 841 | return AVERROR_EXIT; |
867 | } | 842 | } |
868 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
869 | av_frame_free (&output_frame); | 843 | av_frame_free (&output_frame); |
870 | #else | ||
871 | avcodec_free_frame (&output_frame); | ||
872 | #endif | ||
873 | return 0; | 844 | return 0; |
874 | } | 845 | } |
875 | 846 | ||
@@ -990,11 +961,7 @@ extract_audio (struct EXTRACTOR_ExtractContext *ec) | |||
990 | return; | 961 | return; |
991 | } | 962 | } |
992 | 963 | ||
993 | #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT (55,28,1) | ||
994 | frame = av_frame_alloc (); | 964 | frame = av_frame_alloc (); |
995 | #else | ||
996 | frame = avcodec_alloc_frame (); | ||
997 | #endif | ||
998 | if (NULL == frame) | 965 | if (NULL == frame) |
999 | { | 966 | { |
1000 | #if DEBUG | 967 | #if DEBUG |
@@ -1199,7 +1166,6 @@ EXTRACTOR_previewopus_extract_method (struct EXTRACTOR_ExtractContext *ec) | |||
1199 | ssize_t iret; | 1166 | ssize_t iret; |
1200 | void *data; | 1167 | void *data; |
1201 | 1168 | ||
1202 | |||
1203 | if (-1 == (iret = ec->read (ec->cls, | 1169 | if (-1 == (iret = ec->read (ec->cls, |
1204 | &data, | 1170 | &data, |
1205 | 16 * 1024))) | 1171 | 16 * 1024))) |