Opened 9 years ago
Last modified 9 years ago
#4912 new defect
While decoding an flv video av_codec_decode_video2 fails to decode the 2nd frame at first but succeeds after seeking.
Reported by: | tr3wory | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | flv |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
I have a bunch of flv videos recorded with our wowza server with the same problem:
When I try to decode the frames from beginnig to end, the avcodec_decode_video2 skips the 2nd frame (and only that).
But if I seek back to the beginnig it will decode the second frame properly.
How to reproduce:
Attached a simple example code and sample video demonstrating the problem.
See the asserts in line 78 and 96.
Used version:
ffmpeg version N-75147-g9d742d2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --prefix='~/BUILD/ffmpeg'
libavutil 55. 1.100 / 55. 1.100
libavcodec 57. 1.100 / 57. 1.100
libavformat 57. 0.100 / 57. 0.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 1.100 / 6. 1.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
Attachments (3)
Change History (7)
by , 9 years ago
Attachment: | cant_read_2nd_frame.flv added |
---|
by , 9 years ago
Attachment: | minimal_test.c added |
---|
comment:1 by , 9 years ago
Component: | avcodec → undetermined |
---|---|
Keywords: | flv added |
How was the input sample made?
follow-up: 3 comment:2 by , 9 years ago
It was recorded with Wowza:
we record the user's webcam from flash, and stream it to the server.
(I removed the audio stream later with ffmpeg, but the original has the same problem
if I properly skip the audio packets)
It is entirely possible that the file format is not conforming, but since ffmpeg can decode the frames properly after seeking, it looks like there is some problem on the ffmpeg side too.
And I have hundreds of videos like this, so it's a one-off problem.
comment:3 by , 9 years ago
Replying to tr3wory:
(I removed the audio stream later with ffmpeg, but the original has the same problem
if I properly skip the audio packets)
Please also provide the original file.
by , 9 years ago
Attachment: | cant_read_2nd_frame_with_sound.flv added |
---|
Original sample file (won't work with the example code)
comment:4 by , 9 years ago
I uploaded the original file. Keep in mind that the sample code won't work with this file because it does not skip the audio packets.
Sample code describing the problem.