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