Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
{
AviSynthContext *avs = s->priv_data;
{
AviSynthContext *avs = s->priv_data;
- pkt->stream_index = avs->curr_stream++;
avs->curr_stream %= s->nb_streams;
avs->curr_stream %= s->nb_streams;
- *st = s->streams[pkt->stream_index];
+ *st = s->streams[avs->curr_stream];
if ((*st)->discard == AVDISCARD_ALL)
*discard = 1;
else
if ((*st)->discard == AVDISCARD_ALL)
*discard = 1;
else
- pkt->pts = n;
- pkt->dts = n;
- pkt->duration = 1;
-
#ifdef USING_AVISYNTH
/* Define the bpp values for the new AviSynth 2.6 colorspaces.
* Since AvxSynth doesn't have these functions, special-case
#ifdef USING_AVISYNTH
/* Define the bpp values for the new AviSynth 2.6 colorspaces.
* Since AvxSynth doesn't have these functions, special-case
if (av_new_packet(pkt, pkt->size) < 0)
return AVERROR(ENOMEM);
if (av_new_packet(pkt, pkt->size) < 0)
return AVERROR(ENOMEM);
+ pkt->pts = n;
+ pkt->dts = n;
+ pkt->duration = 1;
+ pkt->stream_index = avs->curr_stream;
+
frame = avs_library.avs_get_frame(avs->clip, n);
error = avs_library.avs_clip_get_error(avs->clip);
if (error) {
frame = avs_library.avs_get_frame(avs->clip, n);
error = avs_library.avs_clip_get_error(avs->clip);
if (error) {
- pkt->pts = n;
- pkt->dts = n;
- pkt->duration = samples;
-
pkt->size = avs_bytes_per_channel_sample(avs->vi) *
samples * avs->vi->nchannels;
if (!pkt->size)
pkt->size = avs_bytes_per_channel_sample(avs->vi) *
samples * avs->vi->nchannels;
if (!pkt->size)
if (av_new_packet(pkt, pkt->size) < 0)
return AVERROR(ENOMEM);
if (av_new_packet(pkt, pkt->size) < 0)
return AVERROR(ENOMEM);
+ pkt->pts = n;
+ pkt->dts = n;
+ pkt->duration = samples;
+ pkt->stream_index = avs->curr_stream;
+
avs_library.avs_get_audio(avs->clip, pkt->data, n, samples);
error = avs_library.avs_clip_get_error(avs->clip);
if (error) {
avs_library.avs_get_audio(avs->clip, pkt->data, n, samples);
error = avs_library.avs_clip_get_error(avs->clip);
if (error) {