X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmxg.c;h=3e0c4219e4d0e9fbf0ee2b102d097c9f7c5bec60;hb=7d8f1158436c261d2d1657c33e731f9bec650c51;hp=04991b35304446e3a379faef237c4946a21c3469;hpb=173715d2918a8b2674e2d93e74d36df037ce4409;p=ffmpeg diff --git a/libavformat/mxg.c b/libavformat/mxg.c index 04991b35304..3e0c4219e4d 100644 --- a/libavformat/mxg.c +++ b/libavformat/mxg.c @@ -22,6 +22,7 @@ #include "libavutil/intreadwrite.h" #include "libavcodec/mjpeg.h" #include "avformat.h" +#include "internal.h" #include "avio.h" #define DEFAULT_PACKET_SIZE 1024 @@ -47,7 +48,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap) return AVERROR(ENOMEM); video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO; video_st->codec->codec_id = CODEC_ID_MXPEG; - av_set_pts_info(video_st, 64, 1, 1000000); + avpriv_set_pts_info(video_st, 64, 1, 1000000); audio_st = avformat_new_stream(s, NULL); if (!audio_st) @@ -58,7 +59,7 @@ static int mxg_read_header(AVFormatContext *s, AVFormatParameters *ap) audio_st->codec->sample_rate = 8000; audio_st->codec->bits_per_coded_sample = 8; audio_st->codec->block_align = 1; - av_set_pts_info(audio_st, 64, 1, 1000000); + avpriv_set_pts_info(audio_st, 64, 1, 1000000); mxg->soi_ptr = mxg->buffer_ptr = mxg->buffer = 0; mxg->buffer_size = 0; @@ -103,7 +104,7 @@ static int mxg_update_cache(AVFormatContext *s, unsigned int cache_size) /* reallocate internal buffer */ if (current_pos > current_pos + cache_size) return AVERROR(ENOMEM); - if (mxg->soi_ptr) soi_pos = mxg->soi_ptr - mxg->buffer; + soi_pos = mxg->soi_ptr - mxg->buffer; mxg->buffer = av_fast_realloc(mxg->buffer, &mxg->buffer_size, current_pos + cache_size + FF_INPUT_BUFFER_PADDING_SIZE);