pkt->dts += offset;
}
- if(is_intra_only(st->codec))
- pkt->flags |= PKT_FLAG_KEY;
-
/* do we have a video B frame ? */
delay= st->codec->has_b_frames;
presentation_delayed = 0;
// av_log(NULL, AV_LOG_ERROR, "OUTdelayed:%d/%d pts:%"PRId64", dts:%"PRId64" cur_dts:%"PRId64"\n", presentation_delayed, delay, pkt->pts, pkt->dts, st->cur_dts);
/* update flags */
- if (pc) {
+ if(is_intra_only(st->codec))
+ pkt->flags |= PKT_FLAG_KEY;
+ else if (pc) {
pkt->flags = 0;
/* key frame computation */
if (pc->pict_type == FF_I_TYPE)
}
/* "user interface" functions */
-static void dump_stream_format(AVFormatContext *ic, int i, int index, char *buf, int is_output)
+static void dump_stream_format(AVFormatContext *ic, int i, int index, int is_output)
{
+ char buf[256];
int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
AVStream *st = ic->streams[i];
int g = ff_gcd(st->time_base.num, st->time_base.den);
const char *url,
int is_output)
{
- int i, flags;
- char buf[256];
+ int i;
av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
is_output ? "Output" : "Input",
if(ic->nb_programs) {
int j, k;
for(j=0; j<ic->nb_programs; j++) {
- av_log(NULL, AV_LOG_INFO, " Program %d", ic->programs[j]->id);
- if(ic->programs[j]->name)
- av_log(NULL, AV_LOG_INFO, " \"%s\"\n", ic->programs[j]->name);
+ av_log(NULL, AV_LOG_INFO, " Program %d %s\n", ic->programs[j]->id,
+ ic->programs[j]->name ? ic->programs[j]->name : "");
for(k=0; k<ic->programs[j]->nb_stream_indexes; k++)
- dump_stream_format(ic, ic->programs[j]->stream_index[k], index, buf, is_output);
+ dump_stream_format(ic, ic->programs[j]->stream_index[k], index, is_output);
}
} else
for(i=0;i<ic->nb_streams;i++)
- dump_stream_format(ic, i, index, buf, is_output);
+ dump_stream_format(ic, i, index, is_output);
}
int parse_image_size(int *width_ptr, int *height_ptr, const char *str)