diff options
Diffstat (limited to 'src/plugins/previewopus_extractor.c')
-rw-r--r-- | src/plugins/previewopus_extractor.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/src/plugins/previewopus_extractor.c b/src/plugins/previewopus_extractor.c index 9423dcd..a47cdbc 100644 --- a/src/plugins/previewopus_extractor.c +++ b/src/plugins/previewopus_extractor.c @@ -37,35 +37,13 @@ #include "extractor.h" #include <magic.h> -#if HAVE_LIBAVUTIL_AVUTIL_H #include <libavutil/avutil.h> #include <libavutil/audio_fifo.h> #include <libavutil/opt.h> #include <libavutil/mathematics.h> - -#elif HAVE_FFMPEG_AVUTIL_H -#include <ffmpeg/avutil.h> -#include <ffmpeg/audio_fifo.h> -#include <ffmpeg/opt.h> -#include <ffmpeg/mathematics.h> -#endif -#if HAVE_LIBAVFORMAT_AVFORMAT_H #include <libavformat/avformat.h> -#elif HAVE_FFMPEG_AVFORMAT_H -#include <ffmpeg/avformat.h> -#endif -#if HAVE_LIBAVCODEC_AVCODEC_H #include <libavcodec/avcodec.h> -#elif HAVE_FFMPEG_AVCODEC_H -#include <ffmpeg/avcodec.h> -#endif -#if HAVE_LIBSWSCALE_SWSCALE_H #include <libswscale/swscale.h> -#elif HAVE_FFMPEG_SWSCALE_H -#include <ffmpeg/swscale.h> -#endif - -// TODO: Check for ffmpeg #include <libavresample/avresample.h> @@ -466,7 +444,7 @@ decode_audio_frame (AVFrame *frame, fprintf (stderr, "Could not decode frame (error '%s')\n", get_error_text (error)); #endif - av_free_packet (&input_packet); + av_packet_unref (&input_packet); return error; } @@ -476,7 +454,7 @@ decode_audio_frame (AVFrame *frame, */ if (*finished && *data_present) *finished = 0; - av_free_packet (&input_packet); + av_packet_unref (&input_packet); return 0; } @@ -810,7 +788,7 @@ encode_audio_frame (AVFrame *frame, fprintf (stderr, "Could not encode frame (error '%s')\n", get_error_text (error)); #endif - av_free_packet (&output_packet); + av_packet_unref (&output_packet); return error; } @@ -824,11 +802,11 @@ encode_audio_frame (AVFrame *frame, get_error_text (error)); #endif - av_free_packet (&output_packet); + av_packet_unref (&output_packet); return error; } - av_free_packet (&output_packet); + av_packet_unref (&output_packet); } return 0; @@ -1261,8 +1239,6 @@ void __attribute__ ((constructor)) previewopus_lib_init (void) { av_log_set_callback (&previewopus_av_log_callback); - av_register_all (); - } |