Commit 8c1f5fb0 authored by Marton Balint's avatar Marton Balint

ffplay: remove flushed state from decoder context

Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent d25d9296
...@@ -185,7 +185,6 @@ typedef struct Decoder { ...@@ -185,7 +185,6 @@ typedef struct Decoder {
AVCodecContext *avctx; AVCodecContext *avctx;
int pkt_serial; int pkt_serial;
int finished; int finished;
int flushed;
int packet_pending; int packet_pending;
SDL_cond *empty_queue_cond; SDL_cond *empty_queue_cond;
int64_t start_pts; int64_t start_pts;
...@@ -548,8 +547,6 @@ static void decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue, ...@@ -548,8 +547,6 @@ static void decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue,
static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) { static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
int got_frame = 0; int got_frame = 0;
d->flushed = 0;
do { do {
int ret = -1; int ret = -1;
...@@ -566,7 +563,6 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) { ...@@ -566,7 +563,6 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
if (pkt.data == flush_pkt.data) { if (pkt.data == flush_pkt.data) {
avcodec_flush_buffers(d->avctx); avcodec_flush_buffers(d->avctx);
d->finished = 0; d->finished = 0;
d->flushed = 1;
d->next_pts = d->start_pts; d->next_pts = d->start_pts;
d->next_pts_tb = d->start_pts_tb; d->next_pts_tb = d->start_pts_tb;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment