Opened 10 years ago
#3672 new defect
av_read_frame failed after av_seek_frame(0) called
Reported by: | hxuanyu | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I built a test program with latest ffmpeg git header
the test code calls av_seek_frame(0) when av_read_frame returns < 0; while seek succeeded, all subsequent call to av_read_frame failed.
while this failed with latest ffmpeg it succeeded with ffmpeg-2.0.1
while (av_read_frame(pFormatCtx, &pkt) >= 0) {
printf("packet %d\n", count++);
}
ret = av_seek_frame(pFormatCtx, video_stream_idx, 0, AVSEEK_FLAG_BACKWARD);
if (ret < 0) {
printf("seek to 0 failed\n");
return 0;
} else { printf("seek ok\n"); }
av_init_packet(&pkt);
ret = av_read_frame(pFormatCtx, &pkt);
if (ret < 0) {
printf("read after seek failed *\n");
} else {
printf("read ok after seek(0)\n");
}
Attachments (3)
Change History (3)
by , 10 years ago
by , 10 years ago
Attachment: | output_from_latest_and_2.0.1 added |
---|
by , 10 years ago
Attachment: | av_rv10_15_yuv420p_ac3_16000_2_0.rm added |
---|
sample file