[FFmpeg-devel] [PATCH] libavformat/aviobuf.c: don't treat 0 from read_packet as EOF
James Almer
jamrial at gmail.com
Sun Jun 4 00:04:11 EEST 2017
On 6/3/2017 5:31 PM, Daniel Kučera wrote:
> 2017-06-03 21:54 GMT+02:00 Michael Niedermayer <michael at niedermayer.cc>:
>> On Sat, Jun 03, 2017 at 10:16:59AM +0200, Daniel Kucera wrote:
>>> Signed-off-by: Daniel Kucera <daniel.kucera at gmail.com>
>>> ---
>>> libavformat/avio.c | 2 +-
>>> libavformat/aviobuf.c | 18 ++++++++++--------
>>> libavformat/cache.c | 2 +-
>>> libavformat/file.c | 2 ++
>>> libavformat/subfile.c | 2 +-
>>> libavformat/wtvdec.c | 4 ++--
>>> 6 files changed, 17 insertions(+), 13 deletions(-)
>>
>> looses Duration in output in:
>> cat ~/videos/matrixbench_mpeg2.mpg | ./ffprobe -read_ahead_limit -1 cache:pipe:0
>>
>
> I fixed that RTP issue, I'll send updated patch. What does it mean
> "looses Duration" ?
The reported duration (and bitrate it seems) for the input file is lost,
and N/A is shown instead.
Without your patch:
[cache @ 0000000000ecac40] Inner protocol failed to seekback end : -40
[mpeg @ 00000000024f3740] start time for stream 0 is not set in
estimate_timings_from_pts
[cache @ 0000000000ecac40] Inner protocol failed to seekback end : -40
Last message repeated 2 times
Input #0, mpeg, from 'cache:pipe:0':
Duration: 00:03:07.66, start: 0.220000, bitrate: 5633 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
bt470bg/bt470m/bt470m, bottom first), 720x576 [SAR 16:15 DAR 4:3], 25
fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s
Unsupported codec with id 100357 for input stream 0
[cache @ 0000000000ecac40] Statistics, cache hits:16 cache misses:4033
With it:
[cache @ 00000000010aac40] Inner protocol failed to seekback end : -40
Last message repeated 1 times
Input #0, mpeg, from 'cache:pipe:0':
Duration: N/A, start: 0.220000, bitrate: N/A
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv,
bt470bg/bt470m/bt470m, bottom first), 720x576 [SAR 16:15 DAR 4:3], 25
fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s
Unsupported codec with id 100357 for input stream 0
[cache @ 00000000010aac40] Statistics, cache hits:0 cache misses:4033
More information about the ffmpeg-devel
mailing list