mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-24 11:37:50 -05:00
[ffmpeg] Update most deprecated functions
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#ifdef HAVE_LIBAVFILTER
|
||||
# include <libavfilter/avcodec.h>
|
||||
#else
|
||||
# include "ffmpeg-compat.c"
|
||||
# include "ffmpeg-compat.h"
|
||||
#endif
|
||||
|
||||
#include "logger.h"
|
||||
@@ -285,7 +285,7 @@ static int decode_interrupt_cb(void *arg)
|
||||
* packet will be updated, and packet->data is pointed to the data
|
||||
* returned by av_read_frame(). The packet struct is owned by the
|
||||
* caller, but *not* packet->data, so don't free the packet with
|
||||
* av_free_packet()
|
||||
* av_free_packet()/av_packet_unref()
|
||||
* @out stream Set to the input AVStream corresponding to the packet
|
||||
* @out stream_index
|
||||
* Set to the input stream index corresponding to the packet
|
||||
@@ -314,7 +314,7 @@ read_packet(AVPacket *packet, AVStream **stream, unsigned int *stream_index, str
|
||||
{
|
||||
// We are going to read a new packet from source, so now it is safe to
|
||||
// discard the previous packet and reset resume_offset
|
||||
av_free_packet(&ctx->packet);
|
||||
av_packet_unref(&ctx->packet);
|
||||
|
||||
ctx->resume_offset = 0;
|
||||
ctx->timestamp = av_gettime();
|
||||
@@ -1441,7 +1441,7 @@ transcode_needed(const char *user_agent, const char *client_codecs, char *file_c
|
||||
void
|
||||
transcode_decode_cleanup(struct decode_ctx *ctx)
|
||||
{
|
||||
av_free_packet(&ctx->packet);
|
||||
av_packet_unref(&ctx->packet);
|
||||
close_input(ctx);
|
||||
free(ctx);
|
||||
}
|
||||
@@ -1735,7 +1735,7 @@ transcode_seek(struct transcode_ctx *ctx, int ms)
|
||||
in_stream->codec->skip_frame = AVDISCARD_NONREF;
|
||||
while (1)
|
||||
{
|
||||
av_free_packet(&decode_ctx->packet);
|
||||
av_packet_unref(&decode_ctx->packet);
|
||||
|
||||
decode_ctx->timestamp = av_gettime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user