History

avformat/evcdec: flush the bsf on EOF

James Almer committed 3 years ago

Commit a6a5e531 parent 43ace561 file · +4 −4Browse files

Unified · Split

libavformat/evcdec.c+4−4
@@ -183,15 +183,14 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) · 182 unmodified lines
183183 int ret;
184184 int32_t nalu_size;
185185 int au_end_found = 0;
186−
187186 EVCDemuxContext *const c = s->priv_data;
188187
189− if (avio_feof(s->pb))
190− return AVERROR_EOF;
191−
192188 while(!au_end_found) {
193189 uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE];
194190
191+ if (avio_feof(s->pb))
192+ goto end;
193+
195194 ret = ffio_ensure_seekback(s->pb, EVC_NALU_LENGTH_PREFIX_SIZE);
196195 if (ret < 0)
197196 return ret;
@@ -212,6 +211,7 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) · 14 unmodified lines
212211 if (ret != (nalu_size + EVC_NALU_LENGTH_PREFIX_SIZE))
213212 return AVERROR_INVALIDDATA;
214213
214+end:
215215 ret = av_bsf_send_packet(c->bsf, pkt);
216216 if (ret < 0) {
217217 av_log(s, AV_LOG_ERROR, "Failed to send packet to "

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