From 1b4f0857726967064ac504683d06c233c458228b Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Thu, 26 Apr 2012 14:54:39 +0200 Subject: [PATCH 1/2] gitignore: replace library catch-all pattern by more specific patterns Ignoring all files that start with the name of a library matches some files that are not generated. So replace libfoo/libfoo* with patterns for static and shared libraries, pkg-config and version files. --- .gitignore | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index dfc1355d9e..31a02c00f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,14 @@ .config .version +*.a *.o *.d *.exe *.ho +*.pc +*.so +*.so.* +*.ver *-example *-test config.* @@ -21,13 +26,7 @@ doc/print_options libavcodec/*_tablegen libavcodec/*_tables.c libavcodec/*_tables.h -libavcodec/libavcodec* -libavdevice/libavdevice* -libavfilter/libavfilter* -libavformat/libavformat* libavutil/avconfig.h -libavutil/libavutil* -libswscale/libswscale* tests/audiogen tests/base64 tests/data From df8aa4598c7cc1c2f863f6fc6b2d4b3e6dc7345e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 21 Apr 2012 20:44:24 +0300 Subject: [PATCH 2/2] mpegts: Make sure we don't return uninitialized packets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes crashes, where the demuxer could return 0 even if the returned AVPacket isn't initialized at all. This could happen if running into EOF or running out of probesize with non-seekable sources. Signed-off-by: Martin Storsjö --- libavformat/mpegts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index c853e72c3b..2222f25f02 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2020,6 +2020,7 @@ static int mpegts_read_packet(AVFormatContext *s, MpegTSContext *ts = s->priv_data; int ret, i; + pkt->size = -1; ts->pkt = pkt; ret = handle_packets(ts, 0); if (ret < 0) { @@ -2037,6 +2038,8 @@ static int mpegts_read_packet(AVFormatContext *s, } } + if (!ret && pkt->size < 0) + ret = AVERROR(EINTR); return ret; }