Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 670765
Collapse All | Expand All

(-)a/src/AVMuxer.cpp (-1 / +1 lines)
Lines 124-130 AVStream *AVMuxer::Private::addStream(AVFormatContext* ctx, const QString &codec Link Here
124
    c->time_base = s->time_base;
124
    c->time_base = s->time_base;
125
    /* Some formats want stream headers to be separate. */
125
    /* Some formats want stream headers to be separate. */
126
    if (ctx->oformat->flags & AVFMT_GLOBALHEADER)
126
    if (ctx->oformat->flags & AVFMT_GLOBALHEADER)
127
        c->flags |= CODEC_FLAG_GLOBAL_HEADER;
127
        c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
128
    // expose avctx to encoder and set properties in encoder?
128
    // expose avctx to encoder and set properties in encoder?
129
    // list codecs for a given format in ui
129
    // list codecs for a given format in ui
130
    return s;
130
    return s;
(-)a/src/QtAV/private/AVCompat.h (+12 lines)
Lines 456-458 const char *get_codec_long_name(AVCodecID id); Link Here
456
     } } while(0)
456
     } } while(0)
457
457
458
#endif //QTAV_COMPAT_H
458
#endif //QTAV_COMPAT_H
459
460
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,33,0)
461
#define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
462
#endif
463
464
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100)
465
#define AV_INPUT_BUFFER_MIN_SIZE FF_MIN_BUFFER_SIZE
466
#endif
467
468
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56,56,100)
469
#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
470
#endif
(-)a/src/codec/audio/AudioEncoderFFmpeg.cpp (-2 / +2 lines)
Lines 151-158 bool AudioEncoderFFmpegPrivate::open() Link Here
151
    } else {
151
    } else {
152
        buffer_size = frame_size*format_used.bytesPerSample()*format_used.channels()*2+200;
152
        buffer_size = frame_size*format_used.bytesPerSample()*format_used.channels()*2+200;
153
    }
153
    }
154
    if (buffer_size < FF_MIN_BUFFER_SIZE)
154
    if (buffer_size < AV_INPUT_BUFFER_MIN_SIZE)
155
        buffer_size = FF_MIN_BUFFER_SIZE;
155
        buffer_size = AV_INPUT_BUFFER_MIN_SIZE;
156
    buffer.resize(buffer_size);
156
    buffer.resize(buffer_size);
157
    return true;
157
    return true;
158
}
158
}
(-)a/src/codec/video/VideoEncoderFFmpeg.cpp (-1 / +1 lines)
Lines 245-251 bool VideoEncoderFFmpegPrivate::open() Link Here
245
    applyOptionsForContext();
245
    applyOptionsForContext();
246
    AV_ENSURE_OK(avcodec_open2(avctx, codec, &dict), false);
246
    AV_ENSURE_OK(avcodec_open2(avctx, codec, &dict), false);
247
    // from mpv ao_lavc
247
    // from mpv ao_lavc
248
    const int buffer_size = qMax<int>(qMax<int>(width*height*6+200, FF_MIN_BUFFER_SIZE), sizeof(AVPicture));//??
248
    const int buffer_size = qMax<int>(qMax<int>(width*height*6+200, AV_INPUT_BUFFER_MIN_SIZE), sizeof(AVPicture));//??
249
    buffer.resize(buffer_size);
249
    buffer.resize(buffer_size);
250
    return true;
250
    return true;
251
}
251
}
(-)a/src/filter/LibAVFilter.cpp (-1 / +7 lines)
Lines 120-126 class LibAVFilter::Private Link Here
120
        // pixel_aspect==sar, pixel_aspect is more compatible
120
        // pixel_aspect==sar, pixel_aspect is more compatible
121
        QString buffersrc_args = args;
121
        QString buffersrc_args = args;
122
        qDebug("buffersrc_args=%s", buffersrc_args.toUtf8().constData());
122
        qDebug("buffersrc_args=%s", buffersrc_args.toUtf8().constData());
123
        AVFilter *buffersrc  = avfilter_get_by_name(video ? "buffer" : "abuffer");
123
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
124
        const
125
#endif
126
        AVFilter *buffersrc = avfilter_get_by_name(video ? "buffer" : "abuffer");
124
        Q_ASSERT(buffersrc);
127
        Q_ASSERT(buffersrc);
125
        AV_ENSURE_OK(avfilter_graph_create_filter(&in_filter_ctx,
128
        AV_ENSURE_OK(avfilter_graph_create_filter(&in_filter_ctx,
126
                                               buffersrc,
129
                                               buffersrc,
Lines 128-133 class LibAVFilter::Private Link Here
128
                                               filter_graph)
131
                                               filter_graph)
129
                     , false);
132
                     , false);
130
        /* buffer video sink: to terminate the filter chain. */
133
        /* buffer video sink: to terminate the filter chain. */
134
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(7,0,0)
135
        const
136
#endif
131
        AVFilter *buffersink = avfilter_get_by_name(video ? "buffersink" : "abuffersink");
137
        AVFilter *buffersink = avfilter_get_by_name(video ? "buffersink" : "abuffersink");
132
        Q_ASSERT(buffersink);
138
        Q_ASSERT(buffersink);
133
        AV_ENSURE_OK(avfilter_graph_create_filter(&out_filter_ctx, buffersink, "out",
139
        AV_ENSURE_OK(avfilter_graph_create_filter(&out_filter_ctx, buffersink, "out",
(-)a/src/subtitle/SubtitleProcessorFFmpeg.cpp (-1 / +1 lines)
Lines 249-255 bool SubtitleProcessorFFmpeg::processHeader(const QByteArray &codec, const QByte Link Here
249
    codec_ctx->time_base.den = 1000;
249
    codec_ctx->time_base.den = 1000;
250
    if (!data.isEmpty()) {
250
    if (!data.isEmpty()) {
251
        av_free(codec_ctx->extradata);
251
        av_free(codec_ctx->extradata);
252
        codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + FF_INPUT_BUFFER_PADDING_SIZE);
252
        codec_ctx->extradata = (uint8_t*)av_mallocz(data.size() + AV_INPUT_BUFFER_PADDING_SIZE);
253
        if (!codec_ctx->extradata)
253
        if (!codec_ctx->extradata)
254
            return false;
254
            return false;
255
        codec_ctx->extradata_size = data.size();
255
        codec_ctx->extradata_size = data.size();

Return to bug 670765