History

avformat/flacdec: Fix seeking close to EOF

Fixes Ticket5428

Michael Niedermayer committed 10 years ago

Commit d0b21b21 parent b0b36761 file · +6 −3Browse files

Unified · Split

libavformat/flacdec.c+6−3
@@ -259,8 +259,10 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde · 258 unmodified lines
259259 if (ret < 0){
260260 if (ret == AVERROR(EAGAIN))
261261 continue;
262− else
263− break;
262+ else {
263+ av_packet_unref(&pkt);
264+ av_assert1(!pkt.size);
265+ }
264266 }
265267 av_init_packet(&out_pkt);
266268 av_parser_parse2(parser, st->internal->avctx,
@@ -277,7 +279,8 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde · 10 unmodified lines
277279 pts = parser->pts;
278280 break;
279281 }
280− }
282+ } else if (ret < 0)
283+ break;
281284 }
282285 av_parser_close(parser);
283286 return pts;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t