aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/pva.c
diff options
context:
space:
mode:
authorIvo van Poorten <ivop@euronet.nl>2008-01-05 22:27:49 +0000
committerIvo van Poorten <ivop@euronet.nl>2008-01-05 22:27:49 +0000
commitdba13944f0a275a9fa15002a55983cc19146c46e (patch)
tree229d176981fc8f26dd53ae6d7e283a57ba856e9c /libavformat/pva.c
parent7705cf7e1515d56e811a8d92eee65f7969e5fba8 (diff)
downloadffmpeg-dba13944f0a275a9fa15002a55983cc19146c46e.tar.gz
do not return an error, but warn and recover when encountering an audio packet
that should countain a signaled mpeg-pes packet. Originally committed as revision 11428 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/pva.c')
-rw-r--r--libavformat/pva.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/pva.c b/libavformat/pva.c
index 760f7fc90e..0798ffd8df 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -66,6 +66,7 @@ static int pva_read_packet(AVFormatContext *s, AVPacket *pkt) {
int ret, syncword, streamid, reserved, flags, length, pts_flag;
int64_t pva_pts = AV_NOPTS_VALUE;
+recover:
syncword = get_be16(pb);
streamid = get_byte(pb);
get_byte(pb); /* counter not used */
@@ -111,8 +112,10 @@ static int pva_read_packet(AVFormatContext *s, AVPacket *pkt) {
pes_header_data_length = get_byte(pb);
if (pes_signal != 1) {
- av_log(s, AV_LOG_ERROR, "expected signaled PES packet\n");
- return AVERROR(EIO);
+ av_log(s, AV_LOG_WARNING, "expected signaled PES packet, "
+ "trying to recover\n");
+ url_fskip(pb, length - 9);
+ goto recover;
}
get_buffer(pb, pes_header_data, pes_header_data_length);