diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-11 23:35:35 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-12 00:32:54 +0200 |
commit | 411cc5c46a89ce0a79832c37d0eab1ed884e5423 (patch) | |
tree | 0217179f24cd9629b568b521b1c749e51d6ea7c9 /libavformat | |
parent | 5a6f4a130226e04e0db3bd7c7c1ff76fe3f06080 (diff) | |
parent | 6cfed1127005e9d79e03b4b04fd75124a291d3db (diff) | |
download | ffmpeg-411cc5c46a89ce0a79832c37d0eab1ed884e5423.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (31 commits)
audioconvert: add explanatory comments to channel_names array
audioconvert: K&R whitespace cosmetics
avconv: use correct index when selecting metadata to write to.
avconv: fix inverted variable
doc/avconv: document option types (input/output/per-stream/...)
doc/avtools-common-opts: write a section about stream specifiers.
doc/avconv: remove two pointless paragraphs.
doc/avconv: document that global options should be specified first.
doc/avconv: remove entries for nonexistent options
doc/avconv: remove documentation for removed 'timestamp' option
doc: cosmetics, rename fftools-common-opts to avtools-....
avconv: move streamid_map to options context.
avconv: extend -vf syntax
avconv: move top_field_first to options context.
avconv: move inter/intra matrix to options context.
avconv: remove -psnr option.
avconv: remove me_threshold option.
avconv: move video_rc_override_string to options context.
avconv: move frame pixel format to the options context.
avconv: move frame aspect ratio to the options context.
...
Conflicts:
avconv.c
cmdutils_common_opts.h
doc/avconv.texi
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 16 | ||||
-rw-r--r-- | libavformat/utils.c | 11 |
2 files changed, 19 insertions, 8 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index b8c7f5f921..49dd1b1e20 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1321,7 +1321,9 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet) tss->last_cc = cc; if (!cc_ok) { - av_log(ts->stream, AV_LOG_WARNING, "Continuity Check Failed\n"); + av_log(ts->stream, AV_LOG_WARNING, + "Continuity check failed for pid %d expected %d got %d\n", + pid, expected_cc, cc); if(tss->type == MPEGTS_PES) { PESContext *pc = tss->u.pes_filter.opaque; pc->flags |= AV_PKT_FLAG_CORRUPT; @@ -1439,12 +1441,14 @@ static int handle_packets(MpegTSContext *ts, int nb_packets) // av_dlog("Skipping after seek\n"); /* seek detected, flush pes buffer */ for (i = 0; i < NB_PID_MAX; i++) { - if (ts->pids[i] && ts->pids[i]->type == MPEGTS_PES) { - PESContext *pes = ts->pids[i]->u.pes_filter.opaque; - av_freep(&pes->buffer); + if (ts->pids[i]) { + if (ts->pids[i]->type == MPEGTS_PES) { + PESContext *pes = ts->pids[i]->u.pes_filter.opaque; + av_freep(&pes->buffer); + pes->data_index = 0; + pes->state = MPEGTS_SKIP; /* skip until pes header */ + } ts->pids[i]->last_cc = -1; - pes->data_index = 0; - pes->state = MPEGTS_SKIP; /* skip until pes header */ } } } diff --git a/libavformat/utils.c b/libavformat/utils.c index dbe1a6359e..d25f10e8f8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2320,8 +2320,15 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) //try to just open decoders, in case this is enough to get parameters if(!has_codec_parameters(st->codec)){ - if (codec && !st->codec->codec) - avcodec_open2(st->codec, codec, options ? &options[i] : NULL); + if (codec && !st->codec->codec){ + AVDictionary *tmp = NULL; + if (options){ + av_dict_copy(&tmp, options[i], 0); + av_dict_set(&tmp, "threads", 0, 0); + } + avcodec_open2(st->codec, codec, options ? &tmp : NULL); + av_dict_free(&tmp); + } } } |