[issue2266] add null checking to mmst

2010-10-03 Thread qrtt1

New submission from qrtt1 chingyichan...@gmail.com:

I am trying to decode mms streaming. In some case, the user gives a 
media url which is mmsh but the leading is mmst://. It causes 
av_open_input_file function to use the mmst protocol. I know we should 
open the media with the mmsh:// prefix. We got Segmentation fault. 
However,I expect it returns the error code by av_open_input_file.

(I have tested in r25320 )

My testing link are
mmst://210.59.147.3/wmtencoder/100k.wmv
mmsh://210.59.147.3/wmtencoder/100k.wmv

The root cause is the MMSContext is null. 

here is the bt messages:

Program received signal SIGSEGV, Segmentation fault.
mms_read (h=0x804c020, buf=0x804c090 \200\344\004\b, 
size=32768)
at libavformat/mmst.c:588
588 if(mms-asf_header_read_size  mms-asf_header_size) {
(gdb) bt
#0  mms_read (h=0x804c020, buf=0x804c090 \200\344\004\b, 
size=32768)
at libavformat/mmst.c:588
#1  0xb7ee928a in fill_buffer (s=0x80540c0) at libavformat/aviobuf.c:350
#2  0xb7eea643 in get_buffer (s=0x80540c0, buf=0x8054128 , 
size=2048)
at libavformat/aviobuf.c:437
#3  0xb7f71a90 in ff_probe_input_buffer (ic_ptr=0xbffd0210, 
filename=0x804a30c 
mmst://210.59.147.3/wmtencoder/100k.wmv, 
fmt=value optimized out, buf_size=0, ap=0x0) at 
libavformat/utils.c:522
#4  av_open_input_file (ic_ptr=0xbffd0210, 
filename=0x804a30c 
mmst://210.59.147.3/wmtencoder/100k.wmv, 
fmt=value optimized out, buf_size=0, ap=0x0) at 
libavformat/utils.c:589
#5  0x08048f76 in openMediaSource (ctx=0xbffd0210, 
source=0x804a30c mmst://210.59.147.3/wmtencoder/100k.wmv, 
logger=0x0)
at ffmpeg_context.c:73
#6  0x08048c54 in main () at main.c:14

--
files: mmst.patch
messages: 12110
priority: normal
status: new
substatus: new
title: add null checking to mmst
topic: avformat
type: patch


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2266
Index: libavformat/mmst.c
===
--- libavformat/mmst.c	(revision 25320)
+++ libavformat/mmst.c	(working copy)
@@ -462,14 +462,17 @@
 {
 MMSTContext *mmst = (MMSTContext *)h-priv_data;
 MMSContext *mms   = mmst-mms;
-if(mms-mms_hd) {
-send_close_packet(mmst);
-url_close(mms-mms_hd);
+if(mms != NULL)
+{
+	if(mms-mms_hd) {
+	send_close_packet(mmst);
+	url_close(mms-mms_hd);
+	}
+
+	/* free all separately allocated pointers in mms */
+	av_free(mms-streams);
+	av_free(mms-asf_header);
 }
-
-/* free all separately allocated pointers in mms */
-av_free(mms-streams);
-av_free(mms-asf_header);
 av_freep(h-priv_data);
 
 return 0;
@@ -513,6 +516,11 @@
 return AVERROR(ENOMEM);
 mms = mmst-mms;
 
+if(mms == NULL) {
+	err = AVERROR(EIO);
+goto fail;
+}
+
 // only for MMS over TCP, so set proto = NULL
 av_url_split(NULL, 0, NULL, 0,
 mmst-host, sizeof(mmst-host), port, mmst-path,
@@ -584,6 +592,10 @@
 MMSContext *mms   = mmst-mms;
 int result = 0;
 
+if(mms == NULL) {
+	return  AVERROR_IO;
+}
+
 do {
 if(mms-asf_header_read_size  mms-asf_header_size) {
 /* Read from ASF header buffer */


[issue2255] ffmpeg h264 wss

2010-10-03 Thread Kieran K

Kieran K kie...@kunhya.com added the comment:

As discussed on doom10 (http://doom10.org/index.php?topic=653.0) patch 
welcome to pass through AFDs to libx264.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2255



[issue2267] H.264 decoding artefacts

2010-10-03 Thread Kieran K

New submission from Kieran K kie...@kunhya.com:

Artefacts in BBC HD sample which do not appear with JM nor DXVA decoding.

See bbc_hd_artefacts.264

--
files: errors.txt
messages: 12112
priority: normal
status: new
substatus: new
title: H.264 decoding artefacts
type: bug


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2267
FFmpeg version git-svn-r25323, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct  3 2010 17:12:21 with gcc 4.3.4 20090804 (release) 1
  configuration: 
  libavutil 50.32. 0 / 50.32. 0
  libavcore  0. 9. 0 /  0. 9. 0
  libavcodec52.92. 0 / 52.92. 0
  libavformat   52.79. 0 / 52.79. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.48. 0 /  1.48. 0
  libswscale 0.12. 0 /  0.12. 0
[h264 @ 0x24196d0] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1) 
- 25.00 (50/2)
Input #0, h264, from 'out.h264':
  Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 43.41 fps, 
25 tbr, 1200k tbn, 50 tbc
[buffer @ 0x2a1f8f0] w:1440 h:1080 pixfmt:yuv420p
Output #0, yuv4mpegpipe, to 'out.y4m':
  Metadata:
encoder : Lavf52.79.0
Stream #0.0: Video: rawvideo, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 
q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0.0 - #0.0
Press [q] to stop encoding
frame=   10 fps=  0 q=0.0 size=   22781kB time=0.40 bitrate=466562.4kbits/s 
dup=0 drop=10
frame=   21 fps= 19 q=0.0 size=   47841kB time=0.84 bitrate=466561.8kbits/s 
dup=0 drop=21
frame=   32 fps= 20 q=0.0 size=   72900kB time=1.28 bitrate=466561.6kbits/s 
dup=0 drop=32
frame=   42 fps= 20 q=0.0 size=   95682kB time=1.68 bitrate=466561.5kbits/s 
dup=0 drop=43
frame=   53 fps= 20 q=0.0 size=  120741kB time=2.12 bitrate=466561.4kbits/s 
dup=0 drop=53
[h264 @ 0x244a960] illegal short term buffer state detected
frame=   62 fps= 20 q=0.0 size=  141244kB time=2.48 bitrate=466561.4kbits/s 
dup=0 drop=62
frame=   71 fps= 19 q=0.0 size=  161747kB time=2.84 bitrate=466561.4kbits/s 
dup=0 drop=70
frame=   85 fps= 19 q=0.0 size=  193641kB time=3.40 bitrate=466561.3kbits/s 
dup=0 drop=70
frame=   96 fps= 20 q=0.0 size=  218701kB time=3.84 bitrate=466561.3kbits/s 
dup=0 drop=70
frame=  102 fps= 19 q=0.0 size=  232369kB time=4.08 bitrate=466561.3kbits/s 
dup=0 drop=71
frame=  113 fps= 19 q=0.0 size=  257429kB time=4.52 bitrate=466561.3kbits/s 
dup=0 drop=79
frame=  131 fps= 20 q=0.0 size=  298435kB time=5.24 bitrate=466561.3kbits/s 
dup=0 drop=79
frame=  141 fps= 20 q=0.0 size=  321217kB time=5.64 bitrate=466561.3kbits/s 
dup=0 drop=79
frame=  151 fps= 20 q=0.0 size=  343998kB time=6.04 bitrate=466561.3kbits/s 
dup=0 drop=81
frame=  158 fps= 20 q=0.0 size=  359945kB time=6.32 bitrate=466561.3kbits/s 
dup=0 drop=85
frame=  168 fps= 20 q=0.0 size=  382726kB time=6.72 bitrate=466561.3kbits/s 
dup=0 drop=85
frame=  175 fps= 19 q=0.0 size=  398673kB time=7.00 bitrate=466561.3kbits/s 
dup=0 drop=85
frame=  186 fps= 19 q=0.0 size=  423732kB time=7.44 bitrate=466561.3kbits/s 
dup=0 drop=91
frame=  199 fps= 19 q=0.0 size=  453348kB time=7.96 bitrate=466561.3kbits/s 
dup=0 drop=94
frame=  214 fps= 20 q=0.0 size=  487520kB time=8.56 bitrate=466561.3kbits/s 
dup=0 drop=96
frame=  224 fps= 20 q=0.0 size=  510301kB time=8.96 bitrate=466561.3kbits/s 
dup=0 drop=96
frame=  235 fps= 20 q=0.0 size=  535361kB time=9.40 bitrate=466561.3kbits/s 
dup=0 drop=96
frame=  244 fps= 20 q=0.0 size=  555864kB time=9.76 bitrate=466561.3kbits/s 
dup=0 drop=96
frame=  253 fps= 19 q=0.0 size=  576367kB time=10.12 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  263 fps= 19 q=0.0 size=  599148kB time=10.52 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  276 fps= 20 q=0.0 size=  628764kB time=11.04 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  283 fps= 19 q=0.0 size=  644711kB time=11.32 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  294 fps= 20 q=0.0 size=  669771kB time=11.76 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  300 fps= 19 q=0.0 size=  683439kB time=12.00 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  315 fps= 19 q=0.0 size=  717611kB time=12.60 bitrate=466561.2kbits/s 
dup=0 drop=96
[h264 @ 0x244a960] error while decoding MB 11 12, bytestream (-6)
[h264 @ 0x244a960] concealing 5040 DC, 5040 AC, 5040 MV errors
frame=  328 fps= 20 q=0.0 size=  747227kB time=13.12 bitrate=466561.2kbits/s 
dup=0 drop=96
frame=  330 fps= 20 q=0.0 Lsize=  751783kB time=13.20 bitrate=466561.2kbits/s 
dup=0 drop=96
video:0kB audio:0kB global headers:0kB muxing overhead inf%


[issue2265] libavutil/opt.h is not installed

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Maybe I am misunderstanding the issue, but I consider breaking API critical.

--
priority: normal - critical
status: new - open
substatus: new - open


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2265



[issue2246] 'too many video packets in the buffer' with mp4 (mplayer lavf demuxer)

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

Still reproducible with r25326.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2246



[issue2255] ffmpeg h264 wss

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

FFmpeg currently does not warn that it does not support aspect ratio changes
with libx264.

--
substatus: needs_more_info - open


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2255



[issue2266] add null checking to mmst

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

tabs cannot be committed to the FFmpeg repository and please do not re-indent
these lines (to make the patch smaller):
-if(mms-mms_hd) {
-send_close_packet(mmst);
-url_close(mms-mms_hd);

-/* free all separately allocated pointers in mms */
-av_free(mms-streams);
-av_free(mms-asf_header);

Please consider using tools/patcheck

--
status: new - open
substatus: new - needs_changes


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2266



[issue2267] H.264 decoding artefacts

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

This is a reproducible issue.

--
status: new - open
substatus: new - reproduced


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2267



[issue2266] add null checking to mmst

2010-10-03 Thread Ronald S. Bultje

Ronald S. Bultje rsbul...@gmail.com added the comment:

read() is called after close(). That is a bug inside aviobuf.c or whatever 
part is calling this code, the patch itself is an imo unacceptable) 
workaround. The proper fix is to not call read() after close().


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2266



[issue2268] eRightSoft does not distribute FFmpeg's sources

2010-10-03 Thread Carl Eugen Hoyos

New submission from Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at:

eRightSoft distributes FFmpeg binaries under GPL (and gives attribution), but
does not offer sources.

--
files: EULA.txt
messages: 12119
priority: normal
status: open
substatus: open
title: eRightSoft does not distribute FFmpeg's sources
topic: (L)GPL violation


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2268
LICENSE AGREEMENT

SUPER(C) is provided as FREEWARE for non-commercial, PERSONAL USE ONLY.

SUPER(C) MAY NOT BE DISTRIBUTED IN ANY MEANS. YOU MAY NOT
MIRROR SUPER(C) ON FTP, HTTP, TORRENT SITES. YOU MAY NOT
PROVIDE OR DISTRIBUTE SUPER(C) ON A CD, DVD, USB KEY OR ANY
OTHER MATERIAL SUPPORT.
ANY POSSIBLE DISTRIBUTION OF SUPER(C) IS STRICTLY FORBIDDEN.

SUPER(C) MAY NOT BE PACKAGED OR BUNDLED WITH COMMERCIAL PRODUCTS.

SUPER(C) MAY NOT BE SOLD INDIVIDUALLY OR BUNDLED WITH OTHER PRODUCTS (INCLUDING 
EBAY).

X___X

   Do NOT purchase a copy of SUPER ©  from anyone ,
   whether they are providing it on a CD/DVD, by email, by
   indicating a download link or by any other means.

   SUPER © is 100% FREE to download and to use.
   Any attempt to sell SUPER © such as on eBay, is THEFT.
   Violators will be prosecuted to the full extent of the law.

   SUPER © is a FREEWARE that cannot be sold under any circumstances.

X___X

SUPER(C) IS LICENSED TO YOU AS IS, AND WITHOUT ANY WARRANTY OF ANY KIND, 
WHETHER ORAL, WRITTEN, EXPRESS,
IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
THE AUTHOR DOES NOT WARRANT THAT THIS SOFTWARE DOES NOT INFRINGE ANY RIGHTS OF 
THIRD PARTIES.
THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY 
OTHER KIND OF LOSS WHILE
USING OR MISUSING THIS SOFTWARE.
THE USER UNCONDITIONALLY AGREES TO DOWNLOAD, INSTALL AND USE THIS SOFTWARE 
PACKAGE AT HIS OWN RISKS IN ALL CASES.

x_x

 The  FFmpeg, ffmpeg2theora, MPlayer, MEncoder and x264 binaries
 contained in this installation SETUP package and used by SUPER(C)
 are NOT the work of eRightSoft.
 They have been downloaded from the internet as is without modifying
 their GPL source code. They are licensed and distributed under the terms
 of the GNU General Public License as published by the Free Software Foundation.
x_x


[issue113] GSM decoding broken with many samples

2010-10-03 Thread Carl Eugen Hoyos

Carl Eugen Hoyos ceho...@rainbow.studorg.tuwien.ac.at added the comment:

This is no longer an MPlayer regression: The only samples that are still not
working are raw gsm. They were never supported, afaict.

--
assignedto: michaelni - 
nosy:  -michaelni
priority: normal - wish
type: bug - feature_request


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue113



[issue2265] libavutil/opt.h is not installed

2010-10-03 Thread Dan Dennedy

Dan Dennedy d...@dennedy.org added the comment:

I confirm the change below fixes the build of MLT for me.  

Index: libavutil/Makefile
===
--- libavutil/Makefile  (revision 25329)
+++ libavutil/Makefile  (working copy)
@@ -23,6 +23,7 @@
   mathematics.h \
   md5.h \
   mem.h \
+  opt.h \
   pixdesc.h \
   pixfmt.h  \
   random_seed.h \


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2265



[issue2269] aspect ratio has forbidden 0 value with mpeg1video output using yadif

2010-10-03 Thread Lou

New submission from Lou l...@fakeoutdoorsman.com:

Using this sample:
http://samples.mplayerhq.hu/DV-raw/small_test2.dv

$ ffmpeg -v 9 -loglevel 99 -i small_test2.dv -vf yadif -qscale 3
yadif-mpeg1video.mpg
FFmpeg version SVN-r25329, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct  3 2010 14:58:38 with gcc 4.5.1
  configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-libfaac
--enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264
--enable-x11grab --arch=x86_64
  libavutil 50.32. 0 / 50.32. 0
  libavcore  0. 9. 0 /  0. 9. 0
  libavcodec52.92. 0 / 52.92. 0
  libavformat   52.79. 0 / 52.79. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.48. 0 /  1.48. 0
  libswscale 0.12. 0 /  0.12. 0
[NULL @ 0x2496470] Probed with size=131072 and score=75
[dv @ 0x2496470] All info found
[dv @ 0x2496470] Estimating duration from bitrate, this may be inaccurate
Input #0, dv, from 'small_test2.dv':
  Duration: 00:00:02.84, start: 0.00, bitrate: 28800 kb/s
Stream #0.0, 1, 1/25: Video: dvvideo, yuv420p, 720x576, 1/25, 28800 kb/s,
PAR 16:15 DAR 4:3, 25 tbr, 25 tbn, 25 tbc
Stream #0.1, 1, 1/3: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 
kb/s
Stream #0.2, 1, 1/3: Audio: pcm_s16le, 32000 Hz, 2 channels, s16, 1024 
kb/s
[buffer @ 0x249d6a0] w:720 h:576 pixfmt:yuv420p
[yadif @ 0x249dac0] mode:0 parity:-1
Output #0, mpeg, to 'yadif-mpeg1video.mpg':
  Metadata:
encoder : Lavf52.79.0
Stream #0.0, 0, 1/9: Video: mpeg1video, yuv420p, 720x576 [PAR 16:15 DAR
4:3], 1/25, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream #0.1, 0, 1/9: Audio: mp2, 32000 Hz, 2 channels, s16, 64 kb/s
Stream mapping:
  Stream #0.0 - #0.0
  Stream #0.1 - #0.1
Press [q] to stop encoding
[dvvideo @ 0x2497720] AC EOB marker is absent pos=71bitrate=3503.6kbits/s
frame=   71 fps=  0 q=3.0 Lsize=1374kB time=2.80 bitrate=4019.9kbits/s
video:1343kB audio:22kB global headers:0kB muxing overhead 0.67%


$ ffplay -debug 1 yadif-mpeg1video.mpg 
FFplay version SVN-r25329, Copyright (c) 2003-2010 the FFmpeg developers
  built on Oct  3 2010 14:58:38 with gcc 4.5.1
  configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-libfaac
--enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264
--enable-x11grab --arch=x86_64
  libavutil 50.32. 0 / 50.32. 0
  libavcore  0. 9. 0 /  0. 9. 0
  libavcodec52.92. 0 / 52.92. 0
  libavformat   52.79. 0 / 52.79. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter1.48. 0 /  1.48. 0
  libswscale 0.12. 0 /  0.12. 0
[NULL @ 0x1883670] Probed with size=524288 and score=52
[mpeg @ 0x1883670] probing stream 0
Last message repeated 16 times
[mpeg @ 0x1883670] Probe with size=34649, packets=17 detected mpegvideo with
score=51
[mpeg @ 0x1883670] probed stream 0
[mpeg1video @ 0x1884820] aspect ratio has forbidden 0 value
Last message repeated 1 times
Input #0, mpeg, from 'yadif-mpeg1video.mpg':
  Duration: 00:00:02.80, start: 0.50, bitrate: 4008 kb/s
Stream #0.0[0x1e0], 71, 1/9: Video: mpeg1video, yuv420p, 720x576 [PAR
4:1 DAR 5:1], 1/25, 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0.1[0x1c0], 79, 1/9: Audio: mp2, 32000 Hz, 2 channels, s16, 64 
kb/s
[mpeg1video @ 0x1884820] aspect ratio has forbidden 0 value
[mpeg1video @ 0x1884820] vbv buffer: 49152, bitrate:104857200
[mpeg1video @ 0x1884820] aspect ratio has forbidden 0 value
[mpeg1video @ 0x1884820] vbv buffer: 49152, bitrate:104857200
[mpeg1video @ 0x1884820] GOP ( 0:00:00.[00]) closed_gop=0 broken_link=0
[mpeg1video @ 0x1884820] vbv_delay 65535, ref 0 type:1
[mpeg1video @ 0x1884820] qp:6 fc: 0 0 0 0 I ps pf   dc:0 pstruct:3 fdct:1 cmv:0
qtype:0 ivlc:0 rff:0 

...repeating messages...

Also occurs when output container is mkv.

--
messages: 12122
nosy: FakeOutdoorsman
priority: normal
status: new
substatus: new
title: aspect ratio has forbidden 0 value with mpeg1video output using yadif
type: bug


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2269



[issue2269] aspect ratio has forbidden 0 value with mpeg1video output using yadif

2010-10-03 Thread Lou

Lou l...@fakeoutdoorsman.com added the comment:

Output sample yadif-mpeg1video.mpg located in /MPlayer/incoming/issue2269.

Seems to occur with any input I try.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2269



[issue2270] RTP parser fails on RFC 3550 header extensions

2010-10-03 Thread Robert Schlabbach

New submission from Robert Schlabbach rober...@gmx.net:

The RTP parser in libavformat/rtpdec.c, in the 
function rtp_parse_packet_internal() does not check 
the RTP header extension bit and neglects to skip 
header extensions according to RFC 3550 chapter 5.3.1. 
This results e.g. in MPEG-2 Transport Stream parsing 
errors if the header extension should contain the MPEG-
2 synchronization byte (0x47).

Here is a suggested (untested) patch for this 
shortcoming, to be inserted at this point:

445 s-seq = seq;
446 len -= 12;
447 buf += 12;

Change this to:

s-seq = seq;

{
// declare extension flag/length 
variable
int ext;

// store RTP header extension bit
ext = buf[0]  0x10;

// skip past standard RTP header
len -= 12;
buf += 12;

// handle RTP header extensions (RFC 
3550 chapter 5.3.1)
if (ext)
{
// retrieve header extension 
length (in 32-bit words)
ext = AV_RB16(buf + 2);

// add header extension itself 
to extension length
ext++;

// convert header extension 
length to bytes
ext = 2;

// abort if extension length 
exceeds remaining buffer length
if (len  ext)
return -1;

// skip header extension
len -= ext;
buf += ext;
};
}

The declaration of the ext variable can actually be 
moved to the other variable declarations of this 
function, allowing the extra bracket level to be 
removed.

--
messages: 12124
priority: normal
status: new
substatus: analyzed
title: RTP parser fails on RFC 3550 header extensions
type: patch


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue2270