Am 22.10.2013 um 19:26 schrieb Luca Barbato <[email protected]>: > Could you check libav master and this patch and report back please? > > libavcodec/mpegvideo.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c > index 192e27f..718f946 100644 > --- a/libavcodec/mpegvideo.c > +++ b/libavcodec/mpegvideo.c > @@ -1633,8 +1633,12 @@ int ff_MPV_frame_start(MpegEncContext *s, > AVCodecContext *avctx) > return ret; > } > > - assert(s->pict_type == AV_PICTURE_TYPE_I || (s->last_picture_ptr && > - > s->last_picture_ptr->f.data[0])); > + if (s->pict_type != AV_PICTURE_TYPE_I && > + !(s->last_picture_ptr && s->last_picture_ptr->f.data[0])) { > + av_log(s, AV_LOG_ERROR, > + "Non-reference picture received and no reference > available\n"); > + return AVERROR_INVALIDDATA; > + } > > if (s->picture_structure!= PICT_FRAME) { > int i; > -- > 1.8.3.2 >
Thank you, with the patch (against release sources) it works. The start of the
stream seems to be a bit faulty.
The avprobe output is below. Avplay does play the stream. There are no
additional errors. I had to add an additional patch. This stupid camera expects
rtsp CSeq in the second line of a request.
totty@TVSerf:~/libav/libav-9.10$ diff -Nurd libavformat/rtsp.c.orig
libavformat/rtsp.c
--- libavformat/rtsp.c.orig 2013-10-23 23:26:27.499324120 +0200
+++ libavformat/rtsp.c 2013-10-23 23:30:24.258043781 +0200
@@ -1114,9 +1114,9 @@
out_buf = buf;
rt->seq++;
snprintf(buf, sizeof(buf), "%s %s RTSP/1.0\r\n", method, url);
+ av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq);
if (headers)
av_strlcat(buf, headers, sizeof(buf));
- av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", rt->seq);
if (rt->session_id[0] != '\0' && (!headers ||
!strstr(headers, "\nIf-Match:"))) {
av_strlcatf(buf, sizeof(buf), "Session: %s\r\n", rt->session_id);
So far this is all against 9.10 release. I will also test it against git master.
Cheers,
Torsten
totty@TVSerf:~/libav/libav/bin$ ./avprobe -loglevel verbose -rtsp_transport tcp
rtsp://192.168.130.152:554/live/av0?user=admin\&passwd=admin
avprobe version 9.10, Copyright (c) 2007-2013 the Libav developers
built on Oct 23 2013 23:05:15 with gcc 4.7 (Ubuntu/Linaro 4.7.3-1ubuntu1)
configuration: --prefix=/home/totty/libav/libav
libavutil 52. 3. 0 / 52. 3. 0
libavcodec 54. 35. 0 / 54. 35. 0
libavformat 54. 20. 3 / 54. 20. 3
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 3. 3. 0 / 3. 3. 0
libavresample 1. 0. 1 / 1. 0. 1
libswscale 2. 1. 1 / 2. 1. 1
[rtsp @ 0x238aa00] SDP:
v=0
o=- 21051443 782967157 IN IP4 192.168.130.152
s=live
c=IN IP4 0.0.0.0
t=0 0
a=control:*
m=audio 0 RTP/AVP 8
a=control:rtsp://192.168.130.152:554/audio0
m=video 0 RTP/AVP 96
b=AS:2058
a=rtpmap:96 H264/90000
a=range:npt=0-
a=fmtp:96
profile-level-id=420028;packetization-mode=1;sprop-parameter-sets=Z0IAKOkAoAt3/gAAAwABxIAG3dAAzf5gDYgQlA==,aM4xUg==
a=control:rtsp://192.168.130.152:554/video0
Non-reference picture received and no reference available
[h264 @ 0x2390c20] decode_slice_header error
[rtsp @ 0x238aa00] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from
'rtsp://192.168.130.152:554/live/av0?user=admin&passwd=admin':
Metadata:
title : live
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
Stream #0.1: Video: h264 (Baseline), yuvj420p, 1280x720, 27.17 fps, 1k tbr,
90k tbn, 30 tbc
# avprobe output
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
