Opened 10 years ago

Last modified 9 years ago

#3677 new defect

av_read_frame after av_seek_frame failed (.rm)

Reported by: hxuanyu Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: real
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Built my test program with latest ffmpeg git header
commit e222cfefcdcb496e47391b53f0391e9c3cb66397
Merge: e6a0846 4d8c28d
Author: Michael Niedermayer <michaelni@gmx.at>
Date: Tue May 27 02:26:45 2014 +0200

the video I tested with has following packt dts/pts

packet 0 [DTS: 1 PTS: 1, Key=yes]
packet 1 [DTS: 1 PTS: 132, Key=no]
packet 2 [DTS: 66 PTS: 66, Key=no]
packet 3 [DTS: 132 PTS: 266, Key=no]
packet 4 [DTS: 200 PTS: 200, Key=no]
packet 5 [DTS: 266 PTS: 400, Key=no]
packet 6 [DTS: 332 PTS: 332, Key=no]
packet 7 [DTS: 400 PTS: 532, Key=no]
packet 8 [DTS: 466 PTS: 466, Key=no]

if av_seek_frame(1) is called then subsequent call to av_read_frame fails.
if av_seek_frame(0) is called then subsequent call to av_read_frame succeeds

Attachments (3)

seek_to_0.txt (97.5 KB ) - added by hxuanyu 10 years ago.
output when seek to 0 (succeeded)
seek_to_1.txt (49.0 KB ) - added by hxuanyu 10 years ago.
output when seek to 1 (failed)
ffmpeg.c (136.1 KB ) - added by hxuanyu 10 years ago.
test code (my own test code put into main function of ffmpeg.c)

Download all attachments as: .zip

Change History (7)

by hxuanyu, 10 years ago

Attachment: seek_to_0.txt added

output when seek to 0 (succeeded)

by hxuanyu, 10 years ago

Attachment: seek_to_1.txt added

output when seek to 1 (failed)

by hxuanyu, 10 years ago

Attachment: ffmpeg.c added

test code (my own test code put into main function of ffmpeg.c)

comment:1 by hxuanyu, 10 years ago

test video is here https://dl.dropboxusercontent.com/u/89678527/av_rv30_15_yuv420p_atrac3_44100_2_1_starting_pts_1.rm

================================================================
briefly, when seek to 0 you see

packet 787 [DTS: 52400 PTS: 52532, Key=no]
packet 788 [DTS: 52466 PTS: 52466, Key=no]
packet 789 [DTS: 52532 PTS: 52666, Key=no]
packet 790 [DTS: 52600 PTS: 52600, Key=no]
seek 0 ok
read ok after seek(0)
packet 0 [DTS: 1 PTS: 1, Key=yes]
packet 1 [DTS: 1 PTS: 132, Key=no]
packet 2 [DTS: 66 PTS: 66, Key=no]

================================================================

but when seek to 1 (which is the first packet dts/pts) you see

packet 787 [DTS: 52400 PTS: 52532, Key=no]
packet 788 [DTS: 52466 PTS: 52466, Key=no]
packet 789 [DTS: 52532 PTS: 52666, Key=no]
packet 790 [DTS: 52600 PTS: 52600, Key=no]
seek 1 ok
read after seek failed *

Last edited 10 years ago by hxuanyu (previous) (diff)

comment:2 by hxuanyu, 10 years ago

in fact I have 5 rm videos which all have non-zero first packet dts/pts. none of them can read out packet successfully after av_seek_frame(first dts/pts) is called

comment:3 by Michael Niedermayer, 9 years ago

Keywords: rmdec added
Summary: av_read_frame after av_seek_frame failedav_read_frame after av_seek_frame failed (.rm)

comment:4 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavformat
Keywords: real added; rmdec removed
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.