av_read_frame() can handle uninitialized packets.
Unified · Split
| @@ -449,9 +449,6 @@ static av_cold int init_subtitles(AVFilterContext *ctx) · 448 unmodified lines | ||
| 449 | 449 | ass_process_codec_private(ass->track, |
| 450 | 450 | dec_ctx->subtitle_header, |
| 451 | 451 | dec_ctx->subtitle_header_size); |
| 452 | − av_init_packet(&pkt); | |
| 453 | − pkt.data = NULL; | |
| 454 | − pkt.size = 0; | |
| 455 | 452 | while (av_read_frame(fmt, &pkt) >= 0) { |
| 456 | 453 | int i, got_subtitle; |
| 457 | 454 | AVSubtitle sub = {0}; |