mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-05 21:55:37 +01:00
fftools/ffmpeg_dec: move InputStream.pkt to Decoder
It is purely internal to decoding.
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
struct Decoder {
|
||||
AVFrame *frame;
|
||||
AVPacket *pkt;
|
||||
};
|
||||
|
||||
void dec_free(Decoder **pdec)
|
||||
@@ -43,6 +44,7 @@ void dec_free(Decoder **pdec)
|
||||
return;
|
||||
|
||||
av_frame_free(&dec->frame);
|
||||
av_packet_free(&dec->pkt);
|
||||
|
||||
av_freep(pdec);
|
||||
}
|
||||
@@ -61,6 +63,10 @@ static int dec_alloc(Decoder **pdec)
|
||||
if (!dec->frame)
|
||||
goto fail;
|
||||
|
||||
dec->pkt = av_packet_alloc();
|
||||
if (!dec->pkt)
|
||||
goto fail;
|
||||
|
||||
|
||||
*pdec = dec;
|
||||
|
||||
@@ -418,7 +424,7 @@ int dec_packet(InputStream *ist, const AVPacket *pkt, int no_eof)
|
||||
int ret;
|
||||
|
||||
if (dec->codec_type == AVMEDIA_TYPE_SUBTITLE)
|
||||
return transcode_subtitles(ist, pkt ? pkt : ist->pkt);
|
||||
return transcode_subtitles(ist, pkt ? pkt : d->pkt);
|
||||
|
||||
// With fate-indeo3-2, we're getting 0-sized packets before EOF for some
|
||||
// reason. This seems like a semi-critical bug. Don't trigger EOF, and
|
||||
|
||||
Reference in New Issue
Block a user