Unified · Split
| @@ -183,15 +183,14 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) · 182 unmodified lines | ||
| 183 | 183 | int ret; |
| 184 | 184 | int32_t nalu_size; |
| 185 | 185 | int au_end_found = 0; |
| 186 | − | |
| 187 | 186 | EVCDemuxContext *const c = s->priv_data; |
| 188 | 187 | |
| 189 | − if (avio_feof(s->pb)) | |
| 190 | − return AVERROR_EOF; | |
| 191 | − | |
| 192 | 188 | while(!au_end_found) { |
| 193 | 189 | uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE]; |
| 194 | 190 | |
| 191 | + if (avio_feof(s->pb)) | |
| 192 | + goto end; | |
| 193 | + | |
| 195 | 194 | ret = ffio_ensure_seekback(s->pb, EVC_NALU_LENGTH_PREFIX_SIZE); |
| 196 | 195 | if (ret < 0) |
| 197 | 196 | return ret; |
| @@ -212,6 +211,7 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) · 14 unmodified lines | ||
| 212 | 211 | if (ret != (nalu_size + EVC_NALU_LENGTH_PREFIX_SIZE)) |
| 213 | 212 | return AVERROR_INVALIDDATA; |
| 214 | 213 | |
| 214 | +end: | |
| 215 | 215 | ret = av_bsf_send_packet(c->bsf, pkt); |
| 216 | 216 | if (ret < 0) { |
| 217 | 217 | av_log(s, AV_LOG_ERROR, "Failed to send packet to " |