summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorNico Sabbi <nicola.sabbi@poste.it>2006-01-02 20:27:15 +0000
committerNico Sabbi <nicola.sabbi@poste.it>2006-01-02 20:27:15 +0000
commit27c748b576152abcec3e57807045a8492d84050b (patch)
tree387c55582fafaf6cc0ea1b0214f92701b87c3a92 /libavformat
parent5d4d67e0ffdf273cf67136c08751e65d157d611e (diff)
downloadffmpeg-27c748b576152abcec3e57807045a8492d84050b.tar.gz
try with auto_guess if first detection fails
Originally committed as revision 4802 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpegts.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 2a98338a91..81284542d0 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1183,6 +1183,7 @@ static int mpegts_read_header(AVFormatContext *s,
ts->stream = s;
ts->auto_guess = 0;
+goto_auto_guess:
if (!ts->mpeg2ts_raw) {
/* normal demux */
@@ -1235,8 +1236,15 @@ static int mpegts_read_header(AVFormatContext *s,
}
/* if could not find service, exit */
- if (ts->set_service_ret != 0)
- return -1;
+ if (ts->set_service_ret != 0) {
+ if(ts->auto_guess)
+ return -1;
+ else {
+ //let's retry with auto_guess set
+ ts->auto_guess = 1;
+ goto goto_auto_guess;
+ }
+ }
#ifdef DEBUG_SI
printf("tuning done\n");