mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
libav 0.7: use avformat_write_header() instead of av_write_header()
This commit is contained in:
parent
dbe22c2c02
commit
bb8f9de8ec
@ -265,6 +265,7 @@ artwork_rescale(AVFormatContext *src_ctx, int s, int out_w, int out_h, int forma
|
||||
dst->width = out_w;
|
||||
dst->height = out_h;
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR <= 52 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR <= 1)
|
||||
ret = av_set_parameters(dst_ctx, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
@ -273,6 +274,7 @@ artwork_rescale(AVFormatContext *src_ctx, int s, int out_w, int out_h, int forma
|
||||
ret = -1;
|
||||
goto out_free_dst;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Open encoder */
|
||||
ret = avcodec_open(dst, img_encoder);
|
||||
@ -411,7 +413,11 @@ artwork_rescale(AVFormatContext *src_ctx, int s, int out_w, int out_h, int forma
|
||||
pkt.data = outbuf;
|
||||
pkt.size = ret;
|
||||
|
||||
#if LIBAVFORMAT_VERSION_MAJOR >= 53 || (LIBAVFORMAT_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 3)
|
||||
ret = avformat_write_header(dst_ctx, NULL);
|
||||
#else
|
||||
ret = av_write_header(dst_ctx);
|
||||
#endif
|
||||
if (ret != 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_ART, "Could not write artwork header: %s\n", strerror(AVUNERROR(ret)));
|
||||
|
Loading…
Reference in New Issue
Block a user