History

Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'

* commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c

Michael Niedermayer committed 11 years ago

Commit 40d552d2 parents 8e8219e 1a3eb0439 files · +360 −360Browse files

Unified · Split

39 files
  1. ffplay.c +2 −2
  2. libavdevice/dv1394.c +2 −2
  3. libavdevice/fbdev_dec.c +1 −1
  4. libavfilter/setpts.c +4 −4
  5. libavfilter/vf_crop.c +1 −1
  6. libavfilter/vf_fieldorder.c +1 −1
  7. libavformat/asfdec.c +11 −11
  8. libavformat/avidec.c +15 −16
  9. libavformat/flvdec.c +3 −3
  10. libavformat/hevc.c +22 −22
  11. libavformat/http.c +3 −3
  12. libavformat/ipmovie.c +37 −37
  13. libavformat/isom.c +4 −4
  14. libavformat/mmsh.c +6 −6
  15. libavformat/mmst.c +10 −10
  16. libavformat/mov.c +43 −42
  17. libavformat/mov_chan.c +1 −1
  18. libavformat/mpeg.c +3 −3
  19. libavformat/mpegenc.c +4 −4
  20. libavformat/mpegts.c +17 −17
  21. libavformat/mpegtsenc.c +1 −1
  22. libavformat/mux.c +4 −4
  23. libavformat/mxfdec.c +18 −18
  24. libavformat/mxfenc.c +1 −1
  25. libavformat/nsvdec.c +35 −35
  26. libavformat/oggdec.c +3 −3
  27. libavformat/r3d.c +30 −30
  28. libavformat/rmdec.c +3 −3
  29. libavformat/rtmpproto.c +1 −1
  30. libavformat/rtpdec.c +2 −2
  31. libavformat/rtpdec_hevc.c +4 −4
  32. libavformat/rtpenc.c +3 −3
  33. libavformat/rtsp.c +5 −5
  34. libavformat/rtspdec.c +6 −6
  35. libavformat/utils.c +12 −12
  36. libavresample/audio_convert.c +2 −2
  37. libavresample/audio_mix.c +1 −1
  38. libavresample/resample.c +1 −1
  39. libavresample/utils.c +38 −38
ffplay.c+2−2
@@ -1553,7 +1553,7 @@ static double compute_target_delay(double delay, VideoState *is) · 1552 unmodified lines
1553 }1553 }
1554 }1554 }
1555 1555
1556 av_dlog(NULL, "video: delay=%0.3f A-V=%f\n",1556 av_log(NULL, AV_LOG_TRACE, "video: delay=%0.3f A-V=%f\n",
1557 delay, -diff);1557 delay, -diff);
1558 1558
1559 return delay;1559 return delay;
@@ -2408,7 +2408,7 @@ static int synchronize_audio(VideoState *is, int nb_samples) · 848 unmodified lines
2408 max_nb_samples = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX) / 100));2408 max_nb_samples = ((nb_samples * (100 + SAMPLE_CORRECTION_PERCENT_MAX) / 100));
2409 wanted_nb_samples = FFMIN(FFMAX(wanted_nb_samples, min_nb_samples), max_nb_samples);2409 wanted_nb_samples = FFMIN(FFMAX(wanted_nb_samples, min_nb_samples), max_nb_samples);
2410 }2410 }
2411 av_dlog(NULL, "diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\n",2411 av_log(NULL, AV_LOG_TRACE, "diff=%f adiff=%f sample_diff=%d apts=%0.3f %f\n",
2412 diff, avg_diff, wanted_nb_samples - nb_samples,2412 diff, avg_diff, wanted_nb_samples - nb_samples,
2413 is->audio_clock, is->audio_diff_threshold);2413 is->audio_clock, is->audio_diff_threshold);
2414 }2414 }
libavdevice/dv1394.c+2−2
@@ -160,7 +160,7 @@ restart_poll: · 159 unmodified lines
160 av_log(context, AV_LOG_ERROR, "Failed to get status: %s\n", strerror(errno));160 av_log(context, AV_LOG_ERROR, "Failed to get status: %s\n", strerror(errno));
161 return AVERROR(EIO);161 return AVERROR(EIO);
162 }162 }
163 av_dlog(context, "DV1394: status\n"163 av_log(context, AV_LOG_TRACE, "DV1394: status\n"
164 "\tactive_frame\t%d\n"164 "\tactive_frame\t%d\n"
165 "\tfirst_clear_frame\t%d\n"165 "\tfirst_clear_frame\t%d\n"
166 "\tn_clear_frames\t%d\n"166 "\tn_clear_frames\t%d\n"
@@ -181,7 +181,7 @@ restart_poll: · 14 unmodified lines
181 }181 }
182 }182 }
183 183
184 av_dlog(context, "index %d, avail %d, done %d\n", dv->index, dv->avail,184 av_log(context, AV_LOG_TRACE, "index %d, avail %d, done %d\n", dv->index, dv->avail,
185 dv->done);185 dv->done);
186 186
187 size = avpriv_dv_produce_packet(dv->dv_demux, pkt,187 size = avpriv_dv_produce_packet(dv->dv_demux, pkt,
libavdevice/fbdev_dec.c+1−1
@@ -163,7 +163,7 @@ static int fbdev_read_packet(AVFormatContext *avctx, AVPacket *pkt) · 162 unmodified lines
163 while (1) {163 while (1) {
164 curtime = av_gettime();164 curtime = av_gettime();
165 delay = fbdev->time_frame - curtime;165 delay = fbdev->time_frame - curtime;
166 av_dlog(avctx,166 av_log(avctx, AV_LOG_TRACE,
167 "time_frame:%"PRId64" curtime:%"PRId64" delay:%"PRId64"\n",167 "time_frame:%"PRId64" curtime:%"PRId64" delay:%"PRId64"\n",
168 fbdev->time_frame, curtime, delay);168 fbdev->time_frame, curtime, delay);
169 if (delay <= 0) {169 if (delay <= 0) {
libavfilter/setpts.c+4−4
@@ -177,7 +177,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 176 unmodified lines
177 d = av_expr_eval(setpts->expr, setpts->var_values, NULL);177 d = av_expr_eval(setpts->expr, setpts->var_values, NULL);
178 frame->pts = D2TS(d);178 frame->pts = D2TS(d);
179 179
180 av_dlog(inlink->dst,180 av_log(inlink->dst, AV_LOG_TRACE,
181 "N:%"PRId64" PTS:%s T:%f POS:%s",181 "N:%"PRId64" PTS:%s T:%f POS:%s",
182 (int64_t)setpts->var_values[VAR_N],182 (int64_t)setpts->var_values[VAR_N],
183 d2istr(setpts->var_values[VAR_PTS]),183 d2istr(setpts->var_values[VAR_PTS]),
@@ -185,16 +185,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 1 unmodified line
185 d2istr(setpts->var_values[VAR_POS]));185 d2istr(setpts->var_values[VAR_POS]));
186 switch (inlink->type) {186 switch (inlink->type) {
187 case AVMEDIA_TYPE_VIDEO:187 case AVMEDIA_TYPE_VIDEO:
188 av_dlog(inlink->dst, " INTERLACED:%"PRId64,188 av_log(inlink->dst, AV_LOG_TRACE, " INTERLACED:%"PRId64,
189 (int64_t)setpts->var_values[VAR_INTERLACED]);189 (int64_t)setpts->var_values[VAR_INTERLACED]);
190 break;190 break;
191 case AVMEDIA_TYPE_AUDIO:191 case AVMEDIA_TYPE_AUDIO:
192 av_dlog(inlink->dst, " NB_SAMPLES:%"PRId64" NB_CONSUMED_SAMPLES:%"PRId64,192 av_log(inlink->dst, AV_LOG_TRACE, " NB_SAMPLES:%"PRId64" NB_CONSUMED_SAMPLES:%"PRId64,
193 (int64_t)setpts->var_values[VAR_NB_SAMPLES],193 (int64_t)setpts->var_values[VAR_NB_SAMPLES],
194 (int64_t)setpts->var_values[VAR_NB_CONSUMED_SAMPLES]);194 (int64_t)setpts->var_values[VAR_NB_CONSUMED_SAMPLES]);
195 break;195 break;
196 }196 }
197 av_dlog(inlink->dst, " -> PTS:%s T:%f\n", d2istr(d), TS2T(d, inlink->time_base));197 av_log(inlink->dst, AV_LOG_TRACE, " -> PTS:%s T:%f\n", d2istr(d), TS2T(d, inlink->time_base));
198 198
199 if (inlink->type == AVMEDIA_TYPE_VIDEO) {199 if (inlink->type == AVMEDIA_TYPE_VIDEO) {
200 setpts->var_values[VAR_N] += 1.0;200 setpts->var_values[VAR_N] += 1.0;
libavfilter/vf_crop.c+1−1
@@ -271,7 +271,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) · 270 unmodified lines
271 s->x &= ~((1 << s->hsub) - 1);271 s->x &= ~((1 << s->hsub) - 1);
272 s->y &= ~((1 << s->vsub) - 1);272 s->y &= ~((1 << s->vsub) - 1);
273 273
274 av_dlog(ctx, "n:%d t:%f pos:%f x:%d y:%d x+w:%d y+h:%d\n",274 av_log(ctx, AV_LOG_TRACE, "n:%d t:%f pos:%f x:%d y:%d x+w:%d y+h:%d\n",
275 (int)s->var_values[VAR_N], s->var_values[VAR_T], s->var_values[VAR_POS],275 (int)s->var_values[VAR_N], s->var_values[VAR_T], s->var_values[VAR_POS],
276 s->x, s->y, s->x+s->w, s->y+s->h);276 s->x, s->y, s->x+s->w, s->y+s->h);
277 277
libavfilter/vf_fieldorder.c+1−1
@@ -104,7 +104,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 103 unmodified lines
104 av_frame_copy_props(out, frame);104 av_frame_copy_props(out, frame);
105 }105 }
106 106
107 av_dlog(ctx,107 av_log(ctx, AV_LOG_TRACE,
108 "picture will move %s one line\n",108 "picture will move %s one line\n",
109 s->dst_tff ? "up" : "down");109 s->dst_tff ? "up" : "down");
110 h = frame->height;110 h = frame->height;
libavformat/asfdec.c+11−11
@@ -110,7 +110,7 @@ static const ff_asf_guid stream_bitrate_guid = { /* (http://get.to/sdp) */ · 109 unmodified lines
110 110
111#define PRINT_IF_GUID(g, cmp) \111#define PRINT_IF_GUID(g, cmp) \
112 if (!ff_guidcmp(g, &cmp)) \112 if (!ff_guidcmp(g, &cmp)) \
113 av_dlog(NULL, "(GUID: %s) ", # cmp)113 av_log(NULL, AV_LOG_TRACE, "(GUID: %s) ", # cmp)
114 114
115static void print_guid(ff_asf_guid *g)115static void print_guid(ff_asf_guid *g)
116{116{
@@ -141,10 +141,10 @@ static void print_guid(ff_asf_guid *g) · 24 unmodified lines
141 else PRINT_IF_GUID(g, stream_bitrate_guid);141 else PRINT_IF_GUID(g, stream_bitrate_guid);
142 else PRINT_IF_GUID(g, ff_asf_language_guid);142 else PRINT_IF_GUID(g, ff_asf_language_guid);
143 else143 else
144 av_dlog(NULL, "(GUID: unknown) ");144 av_log(NULL, AV_LOG_TRACE, "(GUID: unknown) ");
145 for (i = 0; i < 16; i++)145 for (i = 0; i < 16; i++)
146 av_dlog(NULL, " 0x%02x,", (*g)[i]);146 av_log(NULL, AV_LOG_TRACE, " 0x%02x,", (*g)[i]);
147 av_dlog(NULL, "}\n");147 av_log(NULL, AV_LOG_TRACE, "}\n");
148}148}
149#undef PRINT_IF_GUID149#undef PRINT_IF_GUID
150#else150#else
@@ -669,7 +669,7 @@ static int asf_read_metadata(AVFormatContext *s, int64_t size) · 518 unmodified lines
669 669
670 if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)670 if ((ret = avio_get_str16le(pb, name_len, name, sizeof(name))) < name_len)
671 avio_skip(pb, name_len - ret);671 avio_skip(pb, name_len - ret);
672 av_dlog(s, "%d stream %d name_len %2d type %d len %4d <%s>\n",672 av_log(s, AV_LOG_TRACE, "%d stream %d name_len %2d type %d len %4d <%s>\n",
673 i, stream_num, name_len, value_type, value_len, name);673 i, stream_num, name_len, value_type, value_len, name);
674 674
675 if (!strcmp(name, "AspectRatioX")){675 if (!strcmp(name, "AspectRatioX")){
@@ -855,7 +855,7 @@ static int asf_read_header(AVFormatContext *s) · 179 unmodified lines
855 &st->sample_aspect_ratio.den,855 &st->sample_aspect_ratio.den,
856 asf->dar[0].num, asf->dar[0].den, INT_MAX);856 asf->dar[0].num, asf->dar[0].den, INT_MAX);
857 857
858 av_dlog(s, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",858 av_log(s, AV_LOG_TRACE, "i=%d, st->codec->codec_type:%d, asf->dar %d:%d sar=%d:%d\n",
859 i, st->codec->codec_type, asf->dar[i].num, asf->dar[i].den,859 i, st->codec->codec_type, asf->dar[i].num, asf->dar[i].den,
860 st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);860 st->sample_aspect_ratio.num, st->sample_aspect_ratio.den);
861 861
@@ -993,7 +993,7 @@ static int asf_get_packet(AVFormatContext *s, AVIOContext *pb) · 131 unmodified lines
993 if (packet_length < asf->hdr.min_pktsize)993 if (packet_length < asf->hdr.min_pktsize)
994 padsize += asf->hdr.min_pktsize - packet_length;994 padsize += asf->hdr.min_pktsize - packet_length;
995 asf->packet_padsize = padsize;995 asf->packet_padsize = padsize;
996 av_dlog(s, "packet: size=%d padsize=%d left=%d\n",996 av_log(s, AV_LOG_TRACE, "packet: size=%d padsize=%d left=%d\n",
997 s->packet_size, asf->packet_padsize, asf->packet_size_left);997 s->packet_size, asf->packet_padsize, asf->packet_size_left);
998 return 0;998 return 0;
999}999}
@@ -1019,7 +1019,7 @@ static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb) · 19 unmodified lines
1019 DO_2BITS(asf->packet_property >> 4, asf->packet_seq, 0);1019 DO_2BITS(asf->packet_property >> 4, asf->packet_seq, 0);
1020 DO_2BITS(asf->packet_property >> 2, asf->packet_frag_offset, 0);1020 DO_2BITS(asf->packet_property >> 2, asf->packet_frag_offset, 0);
1021 DO_2BITS(asf->packet_property, asf->packet_replic_size, 0);1021 DO_2BITS(asf->packet_property, asf->packet_replic_size, 0);
1022 av_dlog(asf, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",1022 av_log(asf, AV_LOG_TRACE, "key:%d stream:%d seq:%d offset:%d replic_size:%d\n",
1023 asf->packet_key_frame, asf->stream_index, asf->packet_seq,1023 asf->packet_key_frame, asf->stream_index, asf->packet_seq,
1024 asf->packet_frag_offset, asf->packet_replic_size);1024 asf->packet_frag_offset, asf->packet_replic_size);
1025 if (rsize+(int64_t)asf->packet_replic_size > asf->packet_size_left) {1025 if (rsize+(int64_t)asf->packet_replic_size > asf->packet_size_left) {
@@ -1178,7 +1178,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt) · 152 unmodified lines
1178 av_assert0(asf_st);1178 av_assert0(asf_st);
1179 1179
1180 if (!asf_st->frag_offset && asf->packet_frag_offset) {1180 if (!asf_st->frag_offset && asf->packet_frag_offset) {
1181 av_dlog(s, "skipping asf data pkt with fragment offset for "1181 av_log(s, AV_LOG_TRACE, "skipping asf data pkt with fragment offset for "
1182 "stream:%d, expected:%d but got %d from pkt)\n",1182 "stream:%d, expected:%d but got %d from pkt)\n",
1183 asf->stream_index, asf_st->frag_offset,1183 asf->stream_index, asf_st->frag_offset,
1184 asf->packet_frag_offset);1184 asf->packet_frag_offset);
@@ -1238,7 +1238,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt) · 53 unmodified lines
1238 asf_st->palette_changed = 0;1238 asf_st->palette_changed = 0;
1239 }1239 }
1240 }1240 }
1241 av_dlog(asf, "new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",1241 av_log(asf, AV_LOG_TRACE, "new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
1242 asf->stream_index, asf->packet_key_frame,1242 asf->stream_index, asf->packet_key_frame,
1243 asf_st->pkt.flags & AV_PKT_FLAG_KEY,1243 asf_st->pkt.flags & AV_PKT_FLAG_KEY,
1244 s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO,1244 s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO,
@@ -1250,7 +1250,7 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt) · 5 unmodified lines
1250 }1250 }
1251 1251
1252 /* read data */1252 /* read data */
1253 av_dlog(asf, "READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",1253 av_log(asf, AV_LOG_TRACE, "READ PACKET s:%d os:%d o:%d,%d l:%d DATA:%p\n",
1254 s->packet_size, asf_st->pkt.size, asf->packet_frag_offset,1254 s->packet_size, asf_st->pkt.size, asf->packet_frag_offset,
1255 asf_st->frag_offset, asf->packet_frag_size, asf_st->pkt.data);1255 asf_st->frag_offset, asf->packet_frag_size, asf_st->pkt.data);
1256 asf->packet_size_left -= asf->packet_frag_size;1256 asf->packet_size_left -= asf->packet_frag_size;
libavformat/avidec.c+15−16
@@ -118,7 +118,7 @@ static int avi_load_index(AVFormatContext *s); · 117 unmodified lines
118static int guess_ni_flag(AVFormatContext *s);118static int guess_ni_flag(AVFormatContext *s);
119 119
120#define print_tag(str, tag, size) \120#define print_tag(str, tag, size) \
121 av_dlog(NULL, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \121 av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \
122 avio_tell(pb), str, tag & 0xff, \122 avio_tell(pb), str, tag & 0xff, \
123 (tag >> 8) & 0xff, \123 (tag >> 8) & 0xff, \
124 (tag >> 16) & 0xff, \124 (tag >> 16) & 0xff, \
@@ -178,7 +178,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) · 53 unmodified lines
178 int64_t last_pos = -1;178 int64_t last_pos = -1;
179 int64_t filesize = avi->fsize;179 int64_t filesize = avi->fsize;
180 180
181 av_dlog(s,181 av_log(s, AV_LOG_TRACE,
182 "longs_pre_entry:%d index_type:%d entries_in_use:%d "182 "longs_pre_entry:%d index_type:%d entries_in_use:%d "
183 "chunk_id:%X base:%16"PRIX64" frame_num:%d\n",183 "chunk_id:%X base:%16"PRIX64" frame_num:%d\n",
184 longs_pre_entry,184 longs_pre_entry,
@@ -220,9 +220,8 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num) · 35 unmodified lines
220 int key = len >= 0;220 int key = len >= 0;
221 len &= 0x7FFFFFFF;221 len &= 0x7FFFFFFF;
222 222
223#ifdef DEBUG_SEEK223 av_log(s, AV_LOG_TRACE, "pos:%"PRId64", len:%X\n", pos, len);
224 av_log(s, AV_LOG_ERROR, "pos:%"PRId64", len:%X\n", pos, len);224
225#endif
226 if (avio_feof(pb))225 if (avio_feof(pb))
227 return AVERROR_INVALIDDATA;226 return AVERROR_INVALIDDATA;
228 227
@@ -518,7 +517,7 @@ static int avi_read_header(AVFormatContext *s) · 289 unmodified lines
518 avi->movi_end = avi->movi_list + size + (size & 1);517 avi->movi_end = avi->movi_list + size + (size & 1);
519 else518 else
520 avi->movi_end = avi->fsize;519 avi->movi_end = avi->fsize;
521 av_dlog(NULL, "movi end=%"PRIx64"\n", avi->movi_end);520 av_log(NULL, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end);
522 goto end_of_header;521 goto end_of_header;
523 } else if (tag1 == MKTAG('I', 'N', 'F', 'O'))522 } else if (tag1 == MKTAG('I', 'N', 'F', 'O'))
524 ff_read_riff_info(s, size - 4);523 ff_read_riff_info(s, size - 4);
@@ -668,7 +667,7 @@ static int avi_read_header(AVFormatContext *s) · 143 unmodified lines
668 }667 }
669 ast->sample_size = avio_rl32(pb); /* sample ssize */668 ast->sample_size = avio_rl32(pb); /* sample ssize */
670 ast->cum_len *= FFMAX(1, ast->sample_size);669 ast->cum_len *= FFMAX(1, ast->sample_size);
671 av_dlog(s, "%"PRIu32" %"PRIu32" %d\n",670 av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
672 ast->rate, ast->scale, ast->sample_size);671 ast->rate, ast->scale, ast->sample_size);
673 672
674 switch (tag1) {673 switch (tag1) {
@@ -931,7 +930,7 @@ static int avi_read_header(AVFormatContext *s) · 256 unmodified lines
931 if (active_aspect.num && active_aspect.den &&930 if (active_aspect.num && active_aspect.den &&
932 active.num && active.den) {931 active.num && active.den) {
933 st->sample_aspect_ratio = av_div_q(active_aspect, active);932 st->sample_aspect_ratio = av_div_q(active_aspect, active);
934 av_dlog(s, "vprp %d/%d %d/%d\n",933 av_log(s, AV_LOG_TRACE, "vprp %d/%d %d/%d\n",
935 active_aspect.num, active_aspect.den,934 active_aspect.num, active_aspect.den,
936 active.num, active.den);935 active.num, active.den);
937 }936 }
@@ -1151,7 +1150,7 @@ start_sync: · 213 unmodified lines
1151 size = d[4] + (d[5] << 8) + (d[6] << 16) + (d[7] << 24);1150 size = d[4] + (d[5] << 8) + (d[6] << 16) + (d[7] << 24);
1152 1151
1153 n = get_stream_idx(d + 2);1152 n = get_stream_idx(d + 2);
1154 av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",1153 av_log(s, AV_LOG_TRACE, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
1155 d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);1154 d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
1156 if (i*(avi->io_fsize>0) + (uint64_t)size > avi->fsize || d[0] > 127)1155 if (i*(avi->io_fsize>0) + (uint64_t)size > avi->fsize || d[0] > 127)
1157 continue;1156 continue;
@@ -1319,7 +1318,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt) · 161 unmodified lines
1319 (AVRational) { FFMAX(1, ast->sample_size),1318 (AVRational) { FFMAX(1, ast->sample_size),
1320 AV_TIME_BASE });1319 AV_TIME_BASE });
1321 1320
1322 av_dlog(s, "%"PRId64" %d/%d %"PRId64"\n", ts,1321 av_log(s, AV_LOG_TRACE, "%"PRId64" %d/%d %"PRId64"\n", ts,
1323 st->time_base.num, st->time_base.den, ast->frame_offset);1322 st->time_base.num, st->time_base.den, ast->frame_offset);
1324 if (ts < best_ts) {1323 if (ts < best_ts) {
1325 best_ts = ts;1324 best_ts = ts;
@@ -1430,7 +1429,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 104 unmodified lines
1430// pkt->dts += ast->start;1429// pkt->dts += ast->start;
1431 if (ast->sample_size)1430 if (ast->sample_size)
1432 pkt->dts /= ast->sample_size;1431 pkt->dts /= ast->sample_size;
1433 av_dlog(s,1432 av_log(s, AV_LOG_TRACE,
1434 "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d "1433 "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d "
1435 "base:%d st:%d size:%d\n",1434 "base:%d st:%d size:%d\n",
1436 pkt->dts,1435 pkt->dts,
@@ -1545,7 +1544,7 @@ static int avi_read_idx1(AVFormatContext *s, int size) · 108 unmodified lines
1545 flags = avio_rl32(pb);1544 flags = avio_rl32(pb);
1546 pos = avio_rl32(pb);1545 pos = avio_rl32(pb);
1547 len = avio_rl32(pb);1546 len = avio_rl32(pb);
1548 av_dlog(s, "%d: tag=0x%x flags=0x%x pos=0x%x len=%d/",1547 av_log(s, AV_LOG_TRACE, "%d: tag=0x%x flags=0x%x pos=0x%x len=%d/",
1549 i, tag, flags, pos, len);1548 i, tag, flags, pos, len);
1550 1549
1551 index = ((tag & 0xff) - '0') * 10;1550 index = ((tag & 0xff) - '0') * 10;
@@ -1561,7 +1560,7 @@ static int avi_read_idx1(AVFormatContext *s, int size) · 9 unmodified lines
1561 }1560 }
1562 pos += data_offset;1561 pos += data_offset;
1563 1562
1564 av_dlog(s, "%d cum_len=%"PRId64"\n", len, ast->cum_len);1563 av_log(s, AV_LOG_TRACE, "%d cum_len=%"PRId64"\n", len, ast->cum_len);
1565 1564
1566 // even if we have only a single stream, we should1565 // even if we have only a single stream, we should
1567 // switch to non-interleaved to get correct timestamps1566 // switch to non-interleaved to get correct timestamps
@@ -1690,7 +1689,7 @@ static int avi_load_index(AVFormatContext *s) · 122 unmodified lines
1690 1689
1691 if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)1690 if (avio_seek(pb, avi->movi_end, SEEK_SET) < 0)
1692 goto the_end; // maybe truncated file1691 goto the_end; // maybe truncated file
1693 av_dlog(s, "movi_end=0x%"PRIx64"\n", avi->movi_end);1692 av_log(s, AV_LOG_TRACE, "movi_end=0x%"PRIx64"\n", avi->movi_end);
1694 for (;;) {1693 for (;;) {
1695 tag = avio_rl32(pb);1694 tag = avio_rl32(pb);
1696 size = avio_rl32(pb);1695 size = avio_rl32(pb);
@@ -1698,7 +1697,7 @@ static int avi_load_index(AVFormatContext *s) · 1 unmodified line
1698 break;1697 break;
1699 next = avio_tell(pb) + size + (size & 1);1698 next = avio_tell(pb) + size + (size & 1);
1700 1699
1701 av_dlog(s, "tag=%c%c%c%c size=0x%x\n",1700 av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c size=0x%x\n",
1702 tag & 0xff,1701 tag & 0xff,
1703 (tag >> 8) & 0xff,1702 (tag >> 8) & 0xff,
1704 (tag >> 16) & 0xff,1703 (tag >> 16) & 0xff,
@@ -1776,7 +1775,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, · 71 unmodified lines
1776 pos = st->index_entries[index].pos;1775 pos = st->index_entries[index].pos;
1777 timestamp = st->index_entries[index].timestamp / FFMAX(ast->sample_size, 1);1776 timestamp = st->index_entries[index].timestamp / FFMAX(ast->sample_size, 1);
1778 1777
1779 av_dlog(s, "XX %"PRId64" %d %"PRId64"\n",1778 av_log(s, AV_LOG_TRACE, "XX %"PRId64" %d %"PRId64"\n",
1780 timestamp, index, st->index_entries[index].timestamp);1779 timestamp, index, st->index_entries[index].timestamp);
1781 1780
1782 if (CONFIG_DV_DEMUXER && avi->dv_demux) {1781 if (CONFIG_DV_DEMUXER && avi->dv_demux) {
libavformat/flvdec.c+3−3
@@ -798,7 +798,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) · 797 unmodified lines
798 size = avio_rb24(s->pb);798 size = avio_rb24(s->pb);
799 dts = avio_rb24(s->pb);799 dts = avio_rb24(s->pb);
800 dts |= avio_r8(s->pb) << 24;800 dts |= avio_r8(s->pb) << 24;
801 av_dlog(s, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));801 av_log(s, AV_LOG_TRACE, "type:%d, size:%d, dts:%"PRId64" pos:%"PRId64"\n", type, size, dts, avio_tell(s->pb));
802 if (avio_feof(s->pb))802 if (avio_feof(s->pb))
803 return AVERROR_EOF;803 return AVERROR_EOF;
804 avio_skip(s->pb, 3); /* stream id, always 0 */804 avio_skip(s->pb, 3); /* stream id, always 0 */
@@ -888,7 +888,7 @@ skip: · 83 unmodified lines
888 return AVERROR(ENOMEM);888 return AVERROR(ENOMEM);
889 889
890 }890 }
891 av_dlog(s, "%d %X %d \n", stream_type, flags, st->discard);891 av_log(s, AV_LOG_TRACE, "%d %X %d \n", stream_type, flags, st->discard);
892 892
893 if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||893 if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY ||
894 stream_type == FLV_STREAM_TYPE_AUDIO)894 stream_type == FLV_STREAM_TYPE_AUDIO)
@@ -1017,7 +1017,7 @@ retry_duration: · 122 unmodified lines
1017 st->codec->sample_rate = cfg.ext_sample_rate;1017 st->codec->sample_rate = cfg.ext_sample_rate;
1018 else1018 else
1019 st->codec->sample_rate = cfg.sample_rate;1019 st->codec->sample_rate = cfg.sample_rate;
1020 av_dlog(s, "mp4a config channels %d sample rate %d\n",1020 av_log(s, AV_LOG_TRACE, "mp4a config channels %d sample rate %d\n",
1021 st->codec->channels, st->codec->sample_rate);1021 st->codec->channels, st->codec->sample_rate);
1022 }1022 }
1023 }1023 }
libavformat/hevc.c+22−22
@@ -849,51 +849,51 @@ static int hvcc_write(AVIOContext *pb, HEVCDecoderConfigurationRecord *hvcc) · 848 unmodified lines
849 hvcc->avgFrameRate = 0;849 hvcc->avgFrameRate = 0;
850 hvcc->constantFrameRate = 0;850 hvcc->constantFrameRate = 0;
851 851
852 av_dlog(NULL, "configurationVersion: %"PRIu8"\n",852 av_log(NULL, AV_LOG_TRACE, "configurationVersion: %"PRIu8"\n",
853 hvcc->configurationVersion);853 hvcc->configurationVersion);
854 av_dlog(NULL, "general_profile_space: %"PRIu8"\n",854 av_log(NULL, AV_LOG_TRACE, "general_profile_space: %"PRIu8"\n",
855 hvcc->general_profile_space);855 hvcc->general_profile_space);
856 av_dlog(NULL, "general_tier_flag: %"PRIu8"\n",856 av_log(NULL, AV_LOG_TRACE, "general_tier_flag: %"PRIu8"\n",
857 hvcc->general_tier_flag);857 hvcc->general_tier_flag);
858 av_dlog(NULL, "general_profile_idc: %"PRIu8"\n",858 av_log(NULL, AV_LOG_TRACE, "general_profile_idc: %"PRIu8"\n",
859 hvcc->general_profile_idc);859 hvcc->general_profile_idc);
860 av_dlog(NULL, "general_profile_compatibility_flags: 0x%08"PRIx32"\n",860 av_log(NULL, AV_LOG_TRACE, "general_profile_compatibility_flags: 0x%08"PRIx32"\n",
861 hvcc->general_profile_compatibility_flags);861 hvcc->general_profile_compatibility_flags);
862 av_dlog(NULL, "general_constraint_indicator_flags: 0x%012"PRIx64"\n",862 av_log(NULL, AV_LOG_TRACE, "general_constraint_indicator_flags: 0x%012"PRIx64"\n",
863 hvcc->general_constraint_indicator_flags);863 hvcc->general_constraint_indicator_flags);
864 av_dlog(NULL, "general_level_idc: %"PRIu8"\n",864 av_log(NULL, AV_LOG_TRACE, "general_level_idc: %"PRIu8"\n",
865 hvcc->general_level_idc);865 hvcc->general_level_idc);
866 av_dlog(NULL, "min_spatial_segmentation_idc: %"PRIu16"\n",866 av_log(NULL, AV_LOG_TRACE, "min_spatial_segmentation_idc: %"PRIu16"\n",
867 hvcc->min_spatial_segmentation_idc);867 hvcc->min_spatial_segmentation_idc);
868 av_dlog(NULL, "parallelismType: %"PRIu8"\n",868 av_log(NULL, AV_LOG_TRACE, "parallelismType: %"PRIu8"\n",
869 hvcc->parallelismType);869 hvcc->parallelismType);
870 av_dlog(NULL, "chromaFormat: %"PRIu8"\n",870 av_log(NULL, AV_LOG_TRACE, "chromaFormat: %"PRIu8"\n",
871 hvcc->chromaFormat);871 hvcc->chromaFormat);
872 av_dlog(NULL, "bitDepthLumaMinus8: %"PRIu8"\n",872 av_log(NULL, AV_LOG_TRACE, "bitDepthLumaMinus8: %"PRIu8"\n",
873 hvcc->bitDepthLumaMinus8);873 hvcc->bitDepthLumaMinus8);
874 av_dlog(NULL, "bitDepthChromaMinus8: %"PRIu8"\n",874 av_log(NULL, AV_LOG_TRACE, "bitDepthChromaMinus8: %"PRIu8"\n",
875 hvcc->bitDepthChromaMinus8);875 hvcc->bitDepthChromaMinus8);
876 av_dlog(NULL, "avgFrameRate: %"PRIu16"\n",876 av_log(NULL, AV_LOG_TRACE, "avgFrameRate: %"PRIu16"\n",
877 hvcc->avgFrameRate);877 hvcc->avgFrameRate);
878 av_dlog(NULL, "constantFrameRate: %"PRIu8"\n",878 av_log(NULL, AV_LOG_TRACE, "constantFrameRate: %"PRIu8"\n",
879 hvcc->constantFrameRate);879 hvcc->constantFrameRate);
880 av_dlog(NULL, "numTemporalLayers: %"PRIu8"\n",880 av_log(NULL, AV_LOG_TRACE, "numTemporalLayers: %"PRIu8"\n",
881 hvcc->numTemporalLayers);881 hvcc->numTemporalLayers);
882 av_dlog(NULL, "temporalIdNested: %"PRIu8"\n",882 av_log(NULL, AV_LOG_TRACE, "temporalIdNested: %"PRIu8"\n",
883 hvcc->temporalIdNested);883 hvcc->temporalIdNested);
884 av_dlog(NULL, "lengthSizeMinusOne: %"PRIu8"\n",884 av_log(NULL, AV_LOG_TRACE, "lengthSizeMinusOne: %"PRIu8"\n",
885 hvcc->lengthSizeMinusOne);885 hvcc->lengthSizeMinusOne);
886 av_dlog(NULL, "numOfArrays: %"PRIu8"\n",886 av_log(NULL, AV_LOG_TRACE, "numOfArrays: %"PRIu8"\n",
887 hvcc->numOfArrays);887 hvcc->numOfArrays);
888 for (i = 0; i < hvcc->numOfArrays; i++) {888 for (i = 0; i < hvcc->numOfArrays; i++) {
889 av_dlog(NULL, "array_completeness[%"PRIu8"]: %"PRIu8"\n",889 av_log(NULL, AV_LOG_TRACE, "array_completeness[%"PRIu8"]: %"PRIu8"\n",
890 i, hvcc->array[i].array_completeness);890 i, hvcc->array[i].array_completeness);
891 av_dlog(NULL, "NAL_unit_type[%"PRIu8"]: %"PRIu8"\n",891 av_log(NULL, AV_LOG_TRACE, "NAL_unit_type[%"PRIu8"]: %"PRIu8"\n",
892 i, hvcc->array[i].NAL_unit_type);892 i, hvcc->array[i].NAL_unit_type);
893 av_dlog(NULL, "numNalus[%"PRIu8"]: %"PRIu16"\n",893 av_log(NULL, AV_LOG_TRACE, "numNalus[%"PRIu8"]: %"PRIu16"\n",
894 i, hvcc->array[i].numNalus);894 i, hvcc->array[i].numNalus);
895 for (j = 0; j < hvcc->array[i].numNalus; j++)895 for (j = 0; j < hvcc->array[i].numNalus; j++)
896 av_dlog(NULL,896 av_log(NULL, AV_LOG_TRACE,
897 "nalUnitLength[%"PRIu8"][%"PRIu16"]: %"PRIu16"\n",897 "nalUnitLength[%"PRIu8"][%"PRIu16"]: %"PRIu16"\n",
898 i, j, hvcc->array[i].nalUnitLength[j]);898 i, j, hvcc->array[i].nalUnitLength[j]);
899 }899 }
libavformat/http.c+3−3
@@ -559,7 +559,7 @@ static int process_line(URLContext *h, char *line, int line_count, · 558 unmodified lines
559 p++;559 p++;
560 s->http_code = strtol(p, &end, 10);560 s->http_code = strtol(p, &end, 10);
561 561
562 av_log(h, AV_LOG_DEBUG, "http_code=%d\n", s->http_code);562 av_log(h, AV_LOG_TRACE, "http_code=%d\n", s->http_code);
563 563
564 if ((ret = check_http_code(h, s->http_code, end)) < 0)564 if ((ret = check_http_code(h, s->http_code, end)) < 0)
565 return ret;565 return ret;
@@ -748,7 +748,7 @@ static int http_read_header(URLContext *h, int *new_location) · 182 unmodified lines
748 if ((err = http_get_line(s, line, sizeof(line))) < 0)748 if ((err = http_get_line(s, line, sizeof(line))) < 0)
749 return err;749 return err;
750 750
751 av_log(h, AV_LOG_DEBUG, "header='%s'\n", line);751 av_log(h, AV_LOG_TRACE, "header='%s'\n", line);
752 752
753 err = process_line(h, line, s->line_count, new_location);753 err = process_line(h, line, s->line_count, new_location);
754 if (err < 0)754 if (err < 0)
@@ -1020,7 +1020,7 @@ static int http_read_stream(URLContext *h, uint8_t *buf, int size) · 265 unmodified lines
1020 1020
1021 s->chunksize = strtoll(line, NULL, 16);1021 s->chunksize = strtoll(line, NULL, 16);
1022 1022
1023 av_dlog(NULL, "Chunked encoding data size: %"PRId64"'\n",1023 av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: %"PRId64"'\n",
1024 s->chunksize);1024 s->chunksize);
1025 1025
1026 if (!s->chunksize)1026 if (!s->chunksize)
libavformat/ipmovie.c+37−37
@@ -147,7 +147,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb, · 146 unmodified lines
147 s->audio_frame_count +=147 s->audio_frame_count +=
148 (s->audio_chunk_size - 6 - s->audio_channels) / s->audio_channels;148 (s->audio_chunk_size - 6 - s->audio_channels) / s->audio_channels;
149 149
150 av_dlog(NULL, "sending audio frame with pts %"PRId64" (%d audio frames)\n",150 av_log(NULL, AV_LOG_TRACE, "sending audio frame with pts %"PRId64" (%d audio frames)\n",
151 pkt->pts, s->audio_frame_count);151 pkt->pts, s->audio_frame_count);
152 152
153 chunk_type = CHUNK_VIDEO;153 chunk_type = CHUNK_VIDEO;
@@ -196,7 +196,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb, · 42 unmodified lines
196 pkt->stream_index = s->video_stream_index;196 pkt->stream_index = s->video_stream_index;
197 pkt->pts = s->video_pts;197 pkt->pts = s->video_pts;
198 198
199 av_dlog(NULL, "sending video frame with pts %"PRId64"\n", pkt->pts);199 av_log(NULL, AV_LOG_TRACE, "sending video frame with pts %"PRId64"\n", pkt->pts);
200 200
201 s->video_pts += s->frame_pts_inc;201 s->video_pts += s->frame_pts_inc;
202 202
@@ -245,36 +245,36 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 42 unmodified lines
245 chunk_size = AV_RL16(&chunk_preamble[0]);245 chunk_size = AV_RL16(&chunk_preamble[0]);
246 chunk_type = AV_RL16(&chunk_preamble[2]);246 chunk_type = AV_RL16(&chunk_preamble[2]);
247 247
248 av_dlog(NULL, "chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);248 av_log(NULL, AV_LOG_TRACE, "chunk type 0x%04X, 0x%04X bytes: ", chunk_type, chunk_size);
249 249
250 switch (chunk_type) {250 switch (chunk_type) {
251 251
252 case CHUNK_INIT_AUDIO:252 case CHUNK_INIT_AUDIO:
253 av_dlog(NULL, "initialize audio\n");253 av_log(NULL, AV_LOG_TRACE, "initialize audio\n");
254 break;254 break;
255 255
256 case CHUNK_AUDIO_ONLY:256 case CHUNK_AUDIO_ONLY:
257 av_dlog(NULL, "audio only\n");257 av_log(NULL, AV_LOG_TRACE, "audio only\n");
258 break;258 break;
259 259
260 case CHUNK_INIT_VIDEO:260 case CHUNK_INIT_VIDEO:
261 av_dlog(NULL, "initialize video\n");261 av_log(NULL, AV_LOG_TRACE, "initialize video\n");
262 break;262 break;
263 263
264 case CHUNK_VIDEO:264 case CHUNK_VIDEO:
265 av_dlog(NULL, "video (and audio)\n");265 av_log(NULL, AV_LOG_TRACE, "video (and audio)\n");
266 break;266 break;
267 267
268 case CHUNK_SHUTDOWN:268 case CHUNK_SHUTDOWN:
269 av_dlog(NULL, "shutdown\n");269 av_log(NULL, AV_LOG_TRACE, "shutdown\n");
270 break;270 break;
271 271
272 case CHUNK_END:272 case CHUNK_END:
273 av_dlog(NULL, "end\n");273 av_log(NULL, AV_LOG_TRACE, "end\n");
274 break;274 break;
275 275
276 default:276 default:
277 av_dlog(NULL, "invalid chunk\n");277 av_log(NULL, AV_LOG_TRACE, "invalid chunk\n");
278 chunk_type = CHUNK_BAD;278 chunk_type = CHUNK_BAD;
279 break;279 break;
280 280
@@ -300,29 +300,29 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 19 unmodified lines
300 chunk_size -= OPCODE_PREAMBLE_SIZE;300 chunk_size -= OPCODE_PREAMBLE_SIZE;
301 chunk_size -= opcode_size;301 chunk_size -= opcode_size;
302 if (chunk_size < 0) {302 if (chunk_size < 0) {
303 av_dlog(NULL, "chunk_size countdown just went negative\n");303 av_log(NULL, AV_LOG_TRACE, "chunk_size countdown just went negative\n");
304 chunk_type = CHUNK_BAD;304 chunk_type = CHUNK_BAD;
305 break;305 break;
306 }306 }
307 307
308 av_dlog(NULL, " opcode type %02X, version %d, 0x%04X bytes: ",308 av_log(NULL, AV_LOG_TRACE, " opcode type %02X, version %d, 0x%04X bytes: ",
309 opcode_type, opcode_version, opcode_size);309 opcode_type, opcode_version, opcode_size);
310 switch (opcode_type) {310 switch (opcode_type) {
311 311
312 case OPCODE_END_OF_STREAM:312 case OPCODE_END_OF_STREAM:
313 av_dlog(NULL, "end of stream\n");313 av_log(NULL, AV_LOG_TRACE, "end of stream\n");
314 avio_skip(pb, opcode_size);314 avio_skip(pb, opcode_size);
315 break;315 break;
316 316
317 case OPCODE_END_OF_CHUNK:317 case OPCODE_END_OF_CHUNK:
318 av_dlog(NULL, "end of chunk\n");318 av_log(NULL, AV_LOG_TRACE, "end of chunk\n");
319 avio_skip(pb, opcode_size);319 avio_skip(pb, opcode_size);
320 break;320 break;
321 321
322 case OPCODE_CREATE_TIMER:322 case OPCODE_CREATE_TIMER:
323 av_dlog(NULL, "create timer\n");323 av_log(NULL, AV_LOG_TRACE, "create timer\n");
324 if ((opcode_version > 0) || (opcode_size != 6)) {324 if ((opcode_version > 0) || (opcode_size != 6)) {
325 av_dlog(NULL, "bad create_timer opcode\n");325 av_log(NULL, AV_LOG_TRACE, "bad create_timer opcode\n");
326 chunk_type = CHUNK_BAD;326 chunk_type = CHUNK_BAD;
327 break;327 break;
328 }328 }
@@ -332,15 +332,15 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 3 unmodified lines
332 break;332 break;
333 }333 }
334 s->frame_pts_inc = ((uint64_t)AV_RL32(&scratch[0])) * AV_RL16(&scratch[4]);334 s->frame_pts_inc = ((uint64_t)AV_RL32(&scratch[0])) * AV_RL16(&scratch[4]);
335 av_dlog(NULL, " %.2f frames/second (timer div = %d, subdiv = %d)\n",335 av_log(NULL, AV_LOG_TRACE, " %.2f frames/second (timer div = %d, subdiv = %d)\n",
336 1000000.0 / s->frame_pts_inc, AV_RL32(&scratch[0]),336 1000000.0 / s->frame_pts_inc, AV_RL32(&scratch[0]),
337 AV_RL16(&scratch[4]));337 AV_RL16(&scratch[4]));
338 break;338 break;
339 339
340 case OPCODE_INIT_AUDIO_BUFFERS:340 case OPCODE_INIT_AUDIO_BUFFERS:
341 av_dlog(NULL, "initialize audio buffers\n");341 av_log(NULL, AV_LOG_TRACE, "initialize audio buffers\n");
342 if (opcode_version > 1 || opcode_size > 10 || opcode_size < 6) {342 if (opcode_version > 1 || opcode_size > 10 || opcode_size < 6) {
343 av_dlog(NULL, "bad init_audio_buffers opcode\n");343 av_log(NULL, AV_LOG_TRACE, "bad init_audio_buffers opcode\n");
344 chunk_type = CHUNK_BAD;344 chunk_type = CHUNK_BAD;
345 break;345 break;
346 }346 }
@@ -362,7 +362,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 15 unmodified lines
362 s->audio_type = AV_CODEC_ID_PCM_S16LE;362 s->audio_type = AV_CODEC_ID_PCM_S16LE;
363 else363 else
364 s->audio_type = AV_CODEC_ID_PCM_U8;364 s->audio_type = AV_CODEC_ID_PCM_U8;
365 av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",365 av_log(NULL, AV_LOG_TRACE, "audio: %d bits, %d Hz, %s, %s format\n",
366 s->audio_bits, s->audio_sample_rate,366 s->audio_bits, s->audio_sample_rate,
367 (s->audio_channels == 2) ? "stereo" : "mono",367 (s->audio_channels == 2) ? "stereo" : "mono",
368 (s->audio_type == AV_CODEC_ID_INTERPLAY_DPCM) ?368 (s->audio_type == AV_CODEC_ID_INTERPLAY_DPCM) ?
@@ -370,16 +370,16 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 1 unmodified line
370 break;370 break;
371 371
372 case OPCODE_START_STOP_AUDIO:372 case OPCODE_START_STOP_AUDIO:
373 av_dlog(NULL, "start/stop audio\n");373 av_log(NULL, AV_LOG_TRACE, "start/stop audio\n");
374 avio_skip(pb, opcode_size);374 avio_skip(pb, opcode_size);
375 break;375 break;
376 376
377 case OPCODE_INIT_VIDEO_BUFFERS:377 case OPCODE_INIT_VIDEO_BUFFERS:
378 av_dlog(NULL, "initialize video buffers\n");378 av_log(NULL, AV_LOG_TRACE, "initialize video buffers\n");
379 if ((opcode_version > 2) || (opcode_size > 8) || opcode_size < 4379 if ((opcode_version > 2) || (opcode_size > 8) || opcode_size < 4
380 || opcode_version == 2 && opcode_size < 8380 || opcode_version == 2 && opcode_size < 8
381 ) {381 ) {
382 av_dlog(NULL, "bad init_video_buffers opcode\n");382 av_log(NULL, AV_LOG_TRACE, "bad init_video_buffers opcode\n");
383 chunk_type = CHUNK_BAD;383 chunk_type = CHUNK_BAD;
384 break;384 break;
385 }385 }
@@ -403,7 +403,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 17 unmodified lines
403 } else {403 } else {
404 s->video_bpp = 16;404 s->video_bpp = 16;
405 }405 }
406 av_dlog(NULL, "video resolution: %d x %d\n",406 av_log(NULL, AV_LOG_TRACE, "video resolution: %d x %d\n",
407 s->video_width, s->video_height);407 s->video_width, s->video_height);
408 break;408 break;
409 409
@@ -414,17 +414,17 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 4 unmodified lines
414 case OPCODE_UNKNOWN_13:414 case OPCODE_UNKNOWN_13:
415 case OPCODE_UNKNOWN_14:415 case OPCODE_UNKNOWN_14:
416 case OPCODE_UNKNOWN_15:416 case OPCODE_UNKNOWN_15:
417 av_dlog(NULL, "unknown (but documented) opcode %02X\n", opcode_type);417 av_log(NULL, AV_LOG_TRACE, "unknown (but documented) opcode %02X\n", opcode_type);
418 avio_skip(pb, opcode_size);418 avio_skip(pb, opcode_size);
419 break;419 break;
420 420
421 case OPCODE_SEND_BUFFER:421 case OPCODE_SEND_BUFFER:
422 av_dlog(NULL, "send buffer\n");422 av_log(NULL, AV_LOG_TRACE, "send buffer\n");
423 avio_skip(pb, opcode_size);423 avio_skip(pb, opcode_size);
424 break;424 break;
425 425
426 case OPCODE_AUDIO_FRAME:426 case OPCODE_AUDIO_FRAME:
427 av_dlog(NULL, "audio frame\n");427 av_log(NULL, AV_LOG_TRACE, "audio frame\n");
428 428
429 /* log position and move on for now */429 /* log position and move on for now */
430 s->audio_chunk_offset = avio_tell(pb);430 s->audio_chunk_offset = avio_tell(pb);
@@ -433,26 +433,26 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 2 unmodified lines
433 break;433 break;
434 434
435 case OPCODE_SILENCE_FRAME:435 case OPCODE_SILENCE_FRAME:
436 av_dlog(NULL, "silence frame\n");436 av_log(NULL, AV_LOG_TRACE, "silence frame\n");
437 avio_skip(pb, opcode_size);437 avio_skip(pb, opcode_size);
438 break;438 break;
439 439
440 case OPCODE_INIT_VIDEO_MODE:440 case OPCODE_INIT_VIDEO_MODE:
441 av_dlog(NULL, "initialize video mode\n");441 av_log(NULL, AV_LOG_TRACE, "initialize video mode\n");
442 avio_skip(pb, opcode_size);442 avio_skip(pb, opcode_size);
443 break;443 break;
444 444
445 case OPCODE_CREATE_GRADIENT:445 case OPCODE_CREATE_GRADIENT:
446 av_dlog(NULL, "create gradient\n");446 av_log(NULL, AV_LOG_TRACE, "create gradient\n");
447 avio_skip(pb, opcode_size);447 avio_skip(pb, opcode_size);
448 break;448 break;
449 449
450 case OPCODE_SET_PALETTE:450 case OPCODE_SET_PALETTE:
451 av_dlog(NULL, "set palette\n");451 av_log(NULL, AV_LOG_TRACE, "set palette\n");
452 /* check for the logical maximum palette size452 /* check for the logical maximum palette size
453 * (3 * 256 + 4 bytes) */453 * (3 * 256 + 4 bytes) */
454 if (opcode_size > 0x304 || opcode_size < 4) {454 if (opcode_size > 0x304 || opcode_size < 4) {
455 av_dlog(NULL, "demux_ipmovie: set_palette opcode with invalid size\n");455 av_log(NULL, AV_LOG_TRACE, "demux_ipmovie: set_palette opcode with invalid size\n");
456 chunk_type = CHUNK_BAD;456 chunk_type = CHUNK_BAD;
457 break;457 break;
458 }458 }
@@ -467,7 +467,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 8 unmodified lines
467 /* sanity check (since they are 16 bit values) */467 /* sanity check (since they are 16 bit values) */
468 if ( (first_color > 0xFF) || (last_color > 0xFF)468 if ( (first_color > 0xFF) || (last_color > 0xFF)
469 || (last_color - first_color + 1)*3 + 4 > opcode_size) {469 || (last_color - first_color + 1)*3 + 4 > opcode_size) {
470 av_dlog(NULL, "demux_ipmovie: set_palette indexes out of range (%d -> %d)\n",470 av_log(NULL, AV_LOG_TRACE, "demux_ipmovie: set_palette indexes out of range (%d -> %d)\n",
471 first_color, last_color);471 first_color, last_color);
472 chunk_type = CHUNK_BAD;472 chunk_type = CHUNK_BAD;
473 break;473 break;
@@ -486,12 +486,12 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 12 unmodified lines
486 break;486 break;
487 487
488 case OPCODE_SET_PALETTE_COMPRESSED:488 case OPCODE_SET_PALETTE_COMPRESSED:
489 av_dlog(NULL, "set palette compressed\n");489 av_log(NULL, AV_LOG_TRACE, "set palette compressed\n");
490 avio_skip(pb, opcode_size);490 avio_skip(pb, opcode_size);
491 break;491 break;
492 492
493 case OPCODE_SET_DECODING_MAP:493 case OPCODE_SET_DECODING_MAP:
494 av_dlog(NULL, "set decoding map\n");494 av_log(NULL, AV_LOG_TRACE, "set decoding map\n");
495 495
496 /* log position and move on for now */496 /* log position and move on for now */
497 s->decode_map_chunk_offset = avio_tell(pb);497 s->decode_map_chunk_offset = avio_tell(pb);
@@ -500,7 +500,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 2 unmodified lines
500 break;500 break;
501 501
502 case OPCODE_VIDEO_DATA:502 case OPCODE_VIDEO_DATA:
503 av_dlog(NULL, "set video data\n");503 av_log(NULL, AV_LOG_TRACE, "set video data\n");
504 504
505 /* log position and move on for now */505 /* log position and move on for now */
506 s->video_chunk_offset = avio_tell(pb);506 s->video_chunk_offset = avio_tell(pb);
@@ -509,7 +509,7 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb, · 2 unmodified lines
509 break;509 break;
510 510
511 default:511 default:
512 av_dlog(NULL, "*** unknown opcode type\n");512 av_log(NULL, AV_LOG_TRACE, "*** unknown opcode type\n");
513 chunk_type = CHUNK_BAD;513 chunk_type = CHUNK_BAD;
514 break;514 break;
515 515
libavformat/isom.c+4−4
@@ -415,7 +415,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag) · 414 unmodified lines
415 int len;415 int len;
416 *tag = avio_r8(pb);416 *tag = avio_r8(pb);
417 len = ff_mp4_read_descr_len(pb);417 len = ff_mp4_read_descr_len(pb);
418 av_dlog(fc, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);418 av_log(fc, AV_LOG_TRACE, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
419 return len;419 return len;
420}420}
421 421
@@ -463,10 +463,10 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 41 unmodified lines
463 codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);463 codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
464 if (codec_id)464 if (codec_id)
465 st->codec->codec_id= codec_id;465 st->codec->codec_id= codec_id;
466 av_dlog(fc, "esds object type id 0x%02x\n", object_type_id);466 av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
467 len = ff_mp4_read_descr(fc, pb, &tag);467 len = ff_mp4_read_descr(fc, pb, &tag);
468 if (tag == MP4DecSpecificDescrTag) {468 if (tag == MP4DecSpecificDescrTag) {
469 av_dlog(fc, "Specific MPEG4 header len=%d\n", len);469 av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);
470 if (!len || (uint64_t)len > (1<<30))470 if (!len || (uint64_t)len > (1<<30))
471 return -1;471 return -1;
472 av_free(st->codec->extradata);472 av_free(st->codec->extradata);
@@ -483,7 +483,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 10 unmodified lines
483 st->codec->sample_rate = cfg.ext_sample_rate;483 st->codec->sample_rate = cfg.ext_sample_rate;
484 else484 else
485 st->codec->sample_rate = cfg.sample_rate;485 st->codec->sample_rate = cfg.sample_rate;
486 av_dlog(fc, "mp4a config channels %d obj %d ext obj %d "486 av_log(fc, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d "
487 "sample rate %d ext sample rate %d\n", st->codec->channels,487 "sample rate %d ext sample rate %d\n", st->codec->channels,
488 cfg.object_type, cfg.ext_object_type,488 cfg.object_type, cfg.ext_object_type,
489 cfg.sample_rate, cfg.ext_sample_rate);489 cfg.sample_rate, cfg.ext_sample_rate);
libavformat/mmsh.c+6−6
@@ -124,7 +124,7 @@ static int read_data_packet(MMSHContext *mmsh, const int len) · 123 unmodified lines
124 return AVERROR(EIO);124 return AVERROR(EIO);
125 }125 }
126 res = ffurl_read_complete(mms->mms_hd, mms->in_buffer, len);126 res = ffurl_read_complete(mms->mms_hd, mms->in_buffer, len);
127 av_dlog(NULL, "Data packet len = %d\n", len);127 av_log(NULL, AV_LOG_TRACE, "Data packet len = %d\n", len);
128 if (res != len) {128 if (res != len) {
129 av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n");129 av_log(NULL, AV_LOG_ERROR, "Read data packet failed!\n");
130 return AVERROR(EIO);130 return AVERROR(EIO);
@@ -158,7 +158,7 @@ static int get_http_header_data(MMSHContext *mmsh) · 27 unmodified lines
158 if (mms->asf_header) {158 if (mms->asf_header) {
159 if (len != mms->asf_header_size) {159 if (len != mms->asf_header_size) {
160 mms->asf_header_size = len;160 mms->asf_header_size = len;
161 av_dlog(NULL, "Header len changed from %d to %d\n",161 av_log(NULL, AV_LOG_TRACE, "Header len changed from %d to %d\n",
162 mms->asf_header_size, len);162 mms->asf_header_size, len);
163 av_freep(&mms->asf_header);163 av_freep(&mms->asf_header);
164 }164 }
@@ -203,7 +203,7 @@ static int get_http_header_data(MMSHContext *mmsh) · 38 unmodified lines
203 av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n");203 av_log(NULL, AV_LOG_ERROR, "Read other chunk type data failed!\n");
204 return AVERROR(EIO);204 return AVERROR(EIO);
205 } else {205 } else {
206 av_dlog(NULL, "Skip chunk type %d \n", chunk_type);206 av_log(NULL, AV_LOG_TRACE, "Skip chunk type %d \n", chunk_type);
207 continue;207 continue;
208 }208 }
209 }209 }
@@ -291,7 +291,7 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim · 81 unmodified lines
291 av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n");291 av_log(NULL, AV_LOG_ERROR, "Build play request failed!\n");
292 goto fail;292 goto fail;
293 }293 }
294 av_dlog(NULL, "out_buffer is %s", headers);294 av_log(NULL, AV_LOG_TRACE, "out_buffer is %s", headers);
295 av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);295 av_opt_set(mms->mms_hd->priv_data, "headers", headers, 0);
296 296
297 err = ffurl_connect(mms->mms_hd, NULL);297 err = ffurl_connect(mms->mms_hd, NULL);
@@ -305,12 +305,12 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim · 7 unmodified lines
305 goto fail;305 goto fail;
306 }306 }
307 307
308 av_dlog(NULL, "Connection successfully open\n");308 av_log(NULL, AV_LOG_TRACE, "Connection successfully open\n");
309 return 0;309 return 0;
310fail:310fail:
311 av_freep(&stream_selection);311 av_freep(&stream_selection);
312 mmsh_close(h);312 mmsh_close(h);
313 av_dlog(NULL, "Connection failed with error %d\n", err);313 av_log(NULL, AV_LOG_TRACE, "Connection failed with error %d\n", err);
314 return err;314 return err;
315}315}
316 316
libavformat/mmst.c+10−10
@@ -215,11 +215,11 @@ static int send_media_file_request(MMSTContext *mmst) · 214 unmodified lines
215static void handle_packet_stream_changing_type(MMSTContext *mmst)215static void handle_packet_stream_changing_type(MMSTContext *mmst)
216{216{
217 MMSContext *mms = &mmst->mms;217 MMSContext *mms = &mmst->mms;
218 av_dlog(NULL, "Stream changing!\n");218 av_log(NULL, AV_LOG_TRACE, "Stream changing!\n");
219 219
220 // 40 is the packet header size, 7 is the prefix size.220 // 40 is the packet header size, 7 is the prefix size.
221 mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7);221 mmst->header_packet_id= AV_RL32(mms->in_buffer + 40 + 7);
222 av_dlog(NULL, "Changed header prefix to 0x%x", mmst->header_packet_id);222 av_log(NULL, AV_LOG_TRACE, "Changed header prefix to 0x%x", mmst->header_packet_id);
223}223}
224 224
225static int send_keepalive_packet(MMSTContext *mmst)225static int send_keepalive_packet(MMSTContext *mmst)
@@ -279,7 +279,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) · 53 unmodified lines
279 }279 }
280 280
281 length_remaining= AV_RL32(mms->in_buffer+8) + 4;281 length_remaining= AV_RL32(mms->in_buffer+8) + 4;
282 av_dlog(NULL, "Length remaining is %d\n", length_remaining);282 av_log(NULL, AV_LOG_TRACE, "Length remaining is %d\n", length_remaining);
283 // read the rest of the packet.283 // read the rest of the packet.
284 if (length_remaining < 0284 if (length_remaining < 0
285 || length_remaining > sizeof(mms->in_buffer) - 12) {285 || length_remaining > sizeof(mms->in_buffer) - 12) {
@@ -358,7 +358,7 @@ static MMSSCPacketType get_tcp_server_response(MMSTContext *mmst) · 72 unmodified lines
358 } else if(packet_id_type == mmst->packet_id) {358 } else if(packet_id_type == mmst->packet_id) {
359 packet_type = SC_PKT_ASF_MEDIA;359 packet_type = SC_PKT_ASF_MEDIA;
360 } else {360 } else {
361 av_dlog(NULL, "packet id type %d is old.", packet_id_type);361 av_log(NULL, AV_LOG_TRACE, "packet id type %d is old.", packet_id_type);
362 continue;362 continue;
363 }363 }
364 }364 }
@@ -384,7 +384,7 @@ static int mms_safe_send_recv(MMSTContext *mmst, · 19 unmodified lines
384 if(send_fun) {384 if(send_fun) {
385 int ret = send_fun(mmst);385 int ret = send_fun(mmst);
386 if (ret < 0) {386 if (ret < 0) {
387 av_dlog(NULL, "Send Packet error before expecting recv packet %d\n", expect_type);387 av_log(NULL, AV_LOG_TRACE, "Send Packet error before expecting recv packet %d\n", expect_type);
388 return ret;388 return ret;
389 }389 }
390 }390 }
@@ -561,7 +561,7 @@ static int mms_open(URLContext *h, const char *uri, int flags) · 170 unmodified lines
561 }561 }
562 err = ff_mms_asf_header_parser(mms);562 err = ff_mms_asf_header_parser(mms);
563 if (err) {563 if (err) {
564 av_dlog(NULL, "asf header parsed failed!\n");564 av_log(NULL, AV_LOG_TRACE, "asf header parsed failed!\n");
565 goto fail;565 goto fail;
566 }566 }
567 mms->header_parsed = 1;567 mms->header_parsed = 1;
@@ -578,11 +578,11 @@ static int mms_open(URLContext *h, const char *uri, int flags) · 10 unmodified lines
578 if (err) {578 if (err) {
579 goto fail;579 goto fail;
580 }580 }
581 av_dlog(NULL, "Leaving open (success)\n");581 av_log(NULL, AV_LOG_TRACE, "Leaving open (success)\n");
582 return 0;582 return 0;
583fail:583fail:
584 mms_close(h);584 mms_close(h);
585 av_dlog(NULL, "Leaving open (failure: %d)\n", err);585 av_log(NULL, AV_LOG_TRACE, "Leaving open (failure: %d)\n", err);
586 return err;586 return err;
587}587}
588 588
@@ -615,12 +615,12 @@ static int mms_read(URLContext *h, uint8_t *buf, int size) · 26 unmodified lines
615 // copy the data to the packet buffer.615 // copy the data to the packet buffer.
616 result = ff_mms_read_data(mms, buf, size);616 result = ff_mms_read_data(mms, buf, size);
617 if (result == 0) {617 if (result == 0) {
618 av_dlog(NULL, "Read ASF media packet size is zero!\n");618 av_log(NULL, AV_LOG_TRACE, "Read ASF media packet size is zero!\n");
619 break;619 break;
620 }620 }
621 }621 }
622 } else {622 } else {
623 av_dlog(NULL, "read packet error!\n");623 av_log(NULL, AV_LOG_TRACE, "read packet error!\n");
624 break;624 break;
625 }625 }
626 }626 }
libavformat/mov.c+43−42
@@ -406,8 +406,8 @@ retry: · 405 unmodified lines
406 av_dict_set(&c->fc->metadata, key2, str, 0);406 av_dict_set(&c->fc->metadata, key2, str, 0);
407 }407 }
408 }408 }
409 av_dlog(c->fc, "lang \"%3s\" ", language);409 av_log(c->fc, AV_LOG_TRACE, "lang \"%3s\" ", language);
410 av_dlog(c->fc, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n",410 av_log(c->fc, AV_LOG_TRACE, "tag \"%s\" value \"%s\" atom \"%.4s\" %d %"PRId64"\n",
411 key, str, (char*)&atom.type, str_size_alloc, atom.size);411 key, str, (char*)&atom.type, str_size_alloc, atom.size);
412 412
413 av_freep(&str);413 av_freep(&str);
@@ -480,7 +480,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 66 unmodified lines
480 480
481 dref->type = avio_rl32(pb);481 dref->type = avio_rl32(pb);
482 avio_rb32(pb); // version + flags482 avio_rb32(pb); // version + flags
483 av_dlog(c->fc, "type %.4s size %d\n", (char*)&dref->type, size);483 av_log(c->fc, AV_LOG_TRACE, "type %.4s size %d\n", (char*)&dref->type, size);
484 484
485 if (dref->type == MKTAG('a','l','i','s') && size > 150) {485 if (dref->type == MKTAG('a','l','i','s') && size > 150) {
486 /* macintosh alias record */486 /* macintosh alias record */
@@ -577,8 +577,8 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 90 unmodified lines
577 ctype = avio_rl32(pb);577 ctype = avio_rl32(pb);
578 type = avio_rl32(pb); /* component subtype */578 type = avio_rl32(pb); /* component subtype */
579 579
580 av_dlog(c->fc, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);580 av_log(c->fc, AV_LOG_TRACE, "ctype= %.4s (0x%08x)\n", (char*)&ctype, ctype);
581 av_dlog(c->fc, "stype= %.4s\n", (char*)&type);581 av_log(c->fc, AV_LOG_TRACE, "stype= %.4s\n", (char*)&type);
582 582
583 if (type == MKTAG('v','i','d','e'))583 if (type == MKTAG('v','i','d','e'))
584 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;584 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
@@ -838,7 +838,7 @@ static int mov_read_moof(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 253 unmodified lines
838 }838 }
839 }839 }
840 c->fragment.moof_offset = c->fragment.implicit_offset = avio_tell(pb) - 8;840 c->fragment.moof_offset = c->fragment.implicit_offset = avio_tell(pb) - 8;
841 av_dlog(c->fc, "moof offset %"PRIx64"\n", c->fragment.moof_offset);841 av_log(c->fc, AV_LOG_TRACE, "moof offset %"PRIx64"\n", c->fragment.moof_offset);
842 return mov_read_default(c, pb, atom);842 return mov_read_default(c, pb, atom);
843}843}
844 844
@@ -919,7 +919,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 74 unmodified lines
919 mov_metadata_creation_time(&c->fc->metadata, creation_time);919 mov_metadata_creation_time(&c->fc->metadata, creation_time);
920 c->time_scale = avio_rb32(pb); /* time scale */920 c->time_scale = avio_rb32(pb); /* time scale */
921 921
922 av_dlog(c->fc, "time scale = %i\n", c->time_scale);922 av_log(c->fc, AV_LOG_TRACE, "time scale = %i\n", c->time_scale);
923 923
924 c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */924 c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */
925 // set the AVCodecContext duration because the duration of individual tracks925 // set the AVCodecContext duration because the duration of individual tracks
@@ -954,7 +954,7 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 28 unmodified lines
954 st = c->fc->streams[c->fc->nb_streams-1];954 st = c->fc->streams[c->fc->nb_streams-1];
955 955
956 little_endian = avio_rb16(pb) & 0xFF;956 little_endian = avio_rb16(pb) & 0xFF;
957 av_dlog(c->fc, "enda %d\n", little_endian);957 av_log(c->fc, AV_LOG_TRACE, "enda %d\n", little_endian);
958 if (little_endian == 1) {958 if (little_endian == 1) {
959 switch (st->codec->codec_id) {959 switch (st->codec->codec_id) {
960 case AV_CODEC_ID_PCM_S24BE:960 case AV_CODEC_ID_PCM_S24BE:
@@ -998,12 +998,13 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 37 unmodified lines
998 color_trc = avio_rb16(pb);998 color_trc = avio_rb16(pb);
999 color_matrix = avio_rb16(pb);999 color_matrix = avio_rb16(pb);
1000 1000
1001 av_dlog(c->fc, "%s: pri %d trc %d matrix %d",1001 av_log(c->fc, AV_LOG_TRACE,
1002 color_parameter_type, color_primaries, color_trc, color_matrix);1002 "%s: pri %d trc %d matrix %d",
1003 color_parameter_type, color_primaries, color_trc, color_matrix);
1003 1004
1004 if (!strncmp(color_parameter_type, "nclx", 4)) {1005 if (!strncmp(color_parameter_type, "nclx", 4)) {
1005 uint8_t color_range = avio_r8(pb) >> 7;1006 uint8_t color_range = avio_r8(pb) >> 7;
1006 av_dlog(c->fc, " full %"PRIu8"", color_range);1007 av_log(c->fc, AV_LOG_TRACE, " full %"PRIu8"", color_range);
1007 if (color_range)1008 if (color_range)
1008 st->codec->color_range = AVCOL_RANGE_JPEG;1009 st->codec->color_range = AVCOL_RANGE_JPEG;
1009 else1010 else
@@ -1040,7 +1041,7 @@ static int mov_read_colr(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 30 unmodified lines
1040 case 7: st->codec->colorspace = AVCOL_SPC_SMPTE240M; break;1041 case 7: st->codec->colorspace = AVCOL_SPC_SMPTE240M; break;
1041 }1042 }
1042 }1043 }
1043 av_dlog(c->fc, "\n");1044 av_log(c->fc, AV_LOG_TRACE, "\n");
1044 1045
1045 return 0;1046 return 0;
1046}1047}
@@ -1497,7 +1498,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb, · 450 unmodified lines
1497 1498
1498 st->codec->bits_per_coded_sample = avio_rb16(pb); /* depth */1499 st->codec->bits_per_coded_sample = avio_rb16(pb); /* depth */
1499 color_table_id = avio_rb16(pb); /* colortable id */1500 color_table_id = avio_rb16(pb); /* colortable id */
1500 av_dlog(c->fc, "depth %d, ctab id %d\n",1501 av_log(c->fc, AV_LOG_TRACE, "depth %d, ctab id %d\n",
1501 st->codec->bits_per_coded_sample, color_table_id);1502 st->codec->bits_per_coded_sample, color_table_id);
1502 /* figure out the palette situation */1503 /* figure out the palette situation */
1503 color_depth = st->codec->bits_per_coded_sample & 0x1F;1504 color_depth = st->codec->bits_per_coded_sample & 0x1F;
@@ -1580,7 +1581,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, · 76 unmodified lines
1580 1581
1581 st->codec->channels = avio_rb16(pb); /* channel count */1582 st->codec->channels = avio_rb16(pb); /* channel count */
1582 st->codec->bits_per_coded_sample = avio_rb16(pb); /* sample size */1583 st->codec->bits_per_coded_sample = avio_rb16(pb); /* sample size */
1583 av_dlog(c->fc, "audio channels %d\n", st->codec->channels);1584 av_log(c->fc, AV_LOG_TRACE, "audio channels %d\n", st->codec->channels);
1584 1585
1585 sc->audio_cid = avio_rb16(pb);1586 sc->audio_cid = avio_rb16(pb);
1586 avio_rb16(pb); /* packet size = 0 */1587 avio_rb16(pb); /* packet size = 0 */
@@ -1588,7 +1589,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb, · 1 unmodified line
1588 st->codec->sample_rate = ((avio_rb32(pb) >> 16));1589 st->codec->sample_rate = ((avio_rb32(pb) >> 16));
1589 1590
1590 // Read QT version 1 fields. In version 0 these do not exist.1591 // Read QT version 1 fields. In version 0 these do not exist.
1591 av_dlog(c->fc, "version =%d, isom =%d\n", version, c->isom);1592 av_log(c->fc, AV_LOG_TRACE, "version =%d, isom =%d\n", version, c->isom);
1592 if (!c->isom ||1593 if (!c->isom ||
1593 (compatible_brands && strstr(compatible_brands->value, "qt "))) {1594 (compatible_brands && strstr(compatible_brands->value, "qt "))) {
1594 1595
@@ -1918,7 +1919,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) · 323 unmodified lines
1918 1919
1919 id = mov_codec_id(st, format);1920 id = mov_codec_id(st, format);
1920 1921
1921 av_dlog(c->fc, "size=%"PRId64" 4CC= %c%c%c%c codec_type=%d\n", size,1922 av_log(c->fc, AV_LOG_TRACE, "size=%"PRId64" 4CC= %c%c%c%c codec_type=%d\n", size,
1922 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,1923 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
1923 (format >> 24) & 0xff, st->codec->codec_type);1924 (format >> 24) & 0xff, st->codec->codec_type);
1924 1925
@@ -1980,7 +1981,7 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 55 unmodified lines
1980 1981
1981 entries = avio_rb32(pb);1982 entries = avio_rb32(pb);
1982 1983
1983 av_dlog(c->fc, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);1984 av_log(c->fc, AV_LOG_TRACE, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);
1984 1985
1985 if (!entries)1986 if (!entries)
1986 return 0;1987 return 0;
@@ -2030,7 +2031,7 @@ static int mov_read_stps(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 43 unmodified lines
2030 2031
2031 for (i = 0; i < entries && !pb->eof_reached; i++) {2032 for (i = 0; i < entries && !pb->eof_reached; i++) {
2032 sc->stps_data[i] = avio_rb32(pb);2033 sc->stps_data[i] = avio_rb32(pb);
2033 //av_dlog(c->fc, "stps %d\n", sc->stps_data[i]);2034 //av_log(c->fc, AV_LOG_TRACE, "stps %d\n", sc->stps_data[i]);
2034 }2035 }
2035 2036
2036 sc->stps_count = i;2037 sc->stps_count = i;
@@ -2057,7 +2058,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 20 unmodified lines
2057 2058
2058 entries = avio_rb32(pb);2059 entries = avio_rb32(pb);
2059 2060
2060 av_dlog(c->fc, "keyframe_count = %d\n", entries);2061 av_log(c->fc, AV_LOG_TRACE, "keyframe_count = %d\n", entries);
2061 2062
2062 if (!entries)2063 if (!entries)
2063 {2064 {
@@ -2078,7 +2079,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 14 unmodified lines
2078 2079
2079 for (i = 0; i < entries && !pb->eof_reached; i++) {2080 for (i = 0; i < entries && !pb->eof_reached; i++) {
2080 sc->keyframes[i] = avio_rb32(pb);2081 sc->keyframes[i] = avio_rb32(pb);
2081 //av_dlog(c->fc, "keyframes[]=%d\n", sc->keyframes[i]);2082 //av_log(c->fc, AV_LOG_TRACE, "keyframes[]=%d\n", sc->keyframes[i]);
2082 }2083 }
2083 2084
2084 sc->keyframe_count = i;2085 sc->keyframe_count = i;
@@ -2118,7 +2119,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 33 unmodified lines
2118 }2119 }
2119 entries = avio_rb32(pb);2120 entries = avio_rb32(pb);
2120 2121
2121 av_dlog(c->fc, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);2122 av_log(c->fc, AV_LOG_TRACE, "sample_size = %d sample_count = %d\n", sc->sample_size, entries);
2122 2123
2123 sc->sample_count = entries;2124 sc->sample_count = entries;
2124 if (sample_size)2125 if (sample_size)
@@ -2188,7 +2189,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 63 unmodified lines
2188 avio_rb24(pb); /* flags */2189 avio_rb24(pb); /* flags */
2189 entries = avio_rb32(pb);2190 entries = avio_rb32(pb);
2190 2191
2191 av_dlog(c->fc, "track[%i].stts.entries = %i\n",2192 av_log(c->fc, AV_LOG_TRACE, "track[%i].stts.entries = %i\n",
2192 c->fc->nb_streams-1, entries);2193 c->fc->nb_streams-1, entries);
2193 2194
2194 if (sc->stts_data)2195 if (sc->stts_data)
@@ -2219,7 +2220,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 24 unmodified lines
2219 sc->stts_data[i].count= sample_count;2220 sc->stts_data[i].count= sample_count;
2220 sc->stts_data[i].duration= sample_duration;2221 sc->stts_data[i].duration= sample_duration;
2221 2222
2222 av_dlog(c->fc, "sample_count=%d, sample_duration=%d\n",2223 av_log(c->fc, AV_LOG_TRACE, "sample_count=%d, sample_duration=%d\n",
2223 sample_count, sample_duration);2224 sample_count, sample_duration);
2224 2225
2225 if ( i+1 == entries2226 if ( i+1 == entries
@@ -2269,7 +2270,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 43 unmodified lines
2269 avio_rb24(pb); /* flags */2270 avio_rb24(pb); /* flags */
2270 entries = avio_rb32(pb);2271 entries = avio_rb32(pb);
2271 2272
2272 av_dlog(c->fc, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);2273 av_log(c->fc, AV_LOG_TRACE, "track[%i].ctts.entries = %i\n", c->fc->nb_streams-1, entries);
2273 2274
2274 if (!entries)2275 if (!entries)
2275 return 0;2276 return 0;
@@ -2286,7 +2287,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 10 unmodified lines
2286 sc->ctts_data[i].count = count;2287 sc->ctts_data[i].count = count;
2287 sc->ctts_data[i].duration= duration;2288 sc->ctts_data[i].duration= duration;
2288 2289
2289 av_dlog(c->fc, "count=%d, duration=%d\n",2290 av_log(c->fc, AV_LOG_TRACE, "count=%d, duration=%d\n",
2290 count, duration);2291 count, duration);
2291 2292
2292 if (FFABS(duration) > (1<<28) && i+2<entries) {2293 if (FFABS(duration) > (1<<28) && i+2<entries) {
@@ -2305,7 +2306,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 12 unmodified lines
2305 if (pb->eof_reached)2306 if (pb->eof_reached)
2306 return AVERROR_EOF;2307 return AVERROR_EOF;
2307 2308
2308 av_dlog(c->fc, "dts shift %d\n", sc->dts_shift);2309 av_log(c->fc, AV_LOG_TRACE, "dts shift %d\n", sc->dts_shift);
2309 2310
2310 return 0;2311 return 0;
2311}2312}
@@ -2484,7 +2485,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 172 unmodified lines
2484 e->size = sample_size;2485 e->size = sample_size;
2485 e->min_distance = distance;2486 e->min_distance = distance;
2486 e->flags = keyframe ? AVINDEX_KEYFRAME : 0;2487 e->flags = keyframe ? AVINDEX_KEYFRAME : 0;
2487 av_dlog(mov->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "2488 av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
2488 "size %d, distance %d, keyframe %d\n", st->index, current_sample,2489 "size %d, distance %d, keyframe %d\n", st->index, current_sample,
2489 current_offset, current_dts, sample_size, distance, keyframe);2490 current_offset, current_dts, sample_size, distance, keyframe);
2490 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->nb_index_entries < 100)2491 if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->nb_index_entries < 100)
@@ -2535,7 +2536,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 44 unmodified lines
2535 total += chunk_count * count;2536 total += chunk_count * count;
2536 }2537 }
2537 2538
2538 av_dlog(mov->fc, "chunk count %d\n", total);2539 av_log(mov->fc, AV_LOG_TRACE, "chunk count %d\n", total);
2539 if (total >= UINT_MAX / sizeof(*st->index_entries) - st->nb_index_entries)2540 if (total >= UINT_MAX / sizeof(*st->index_entries) - st->nb_index_entries)
2540 return;2541 return;
2541 if (av_reallocp_array(&st->index_entries,2542 if (av_reallocp_array(&st->index_entries,
@@ -2582,7 +2583,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st) · 40 unmodified lines
2582 e->size = size;2583 e->size = size;
2583 e->min_distance = 0;2584 e->min_distance = 0;
2584 e->flags = AVINDEX_KEYFRAME;2585 e->flags = AVINDEX_KEYFRAME;
2585 av_dlog(mov->fc, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "2586 av_log(mov->fc, AV_LOG_TRACE, "AVIndex stream %d, chunk %d, offset %"PRIx64", dts %"PRId64", "
2586 "size %d, duration %d\n", st->index, i, current_offset, current_dts,2587 "size %d, duration %d\n", st->index, i, current_offset, current_dts,
2587 size, samples);2588 size, samples);
2588 2589
@@ -3044,7 +3045,7 @@ static int mov_read_tfhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 455 unmodified lines
3044 "%"PRId64"\n", frag->track_id, frag->implicit_offset);3045 "%"PRId64"\n", frag->track_id, frag->implicit_offset);
3045 }3046 }
3046 }3047 }
3047 av_dlog(c->fc, "frag flags 0x%x\n", frag->flags);3048 av_log(c->fc, AV_LOG_TRACE, "frag flags 0x%x\n", frag->flags);
3048 return 0;3049 return 0;
3049}3050}
3050 3051
@@ -3138,7 +3139,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 87 unmodified lines
3138 avio_r8(pb); /* version */3139 avio_r8(pb); /* version */
3139 flags = avio_rb24(pb);3140 flags = avio_rb24(pb);
3140 entries = avio_rb32(pb);3141 entries = avio_rb32(pb);
3141 av_dlog(c->fc, "flags 0x%x entries %d\n", flags, entries);3142 av_log(c->fc, AV_LOG_TRACE, "flags 0x%x entries %d\n", flags, entries);
3142 3143
3143 /* Always assume the presence of composition time offsets.3144 /* Always assume the presence of composition time offsets.
3144 * Without this assumption, for instance, we cannot deal with a track in fragmented movies that meet the following.3145 * Without this assumption, for instance, we cannot deal with a track in fragmented movies that meet the following.
@@ -3168,7 +3169,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 23 unmodified lines
3168 dts = sc->track_end - sc->time_offset;3169 dts = sc->track_end - sc->time_offset;
3169 offset = frag->base_data_offset + data_offset;3170 offset = frag->base_data_offset + data_offset;
3170 distance = 0;3171 distance = 0;
3171 av_dlog(c->fc, "first sample flags 0x%x\n", first_sample_flags);3172 av_log(c->fc, AV_LOG_TRACE, "first sample flags 0x%x\n", first_sample_flags);
3172 for (i = 0; i < entries && !pb->eof_reached; i++) {3173 for (i = 0; i < entries && !pb->eof_reached; i++) {
3173 unsigned sample_size = frag->size;3174 unsigned sample_size = frag->size;
3174 int sample_flags = i ? frag->flags : first_sample_flags;3175 int sample_flags = i ? frag->flags : first_sample_flags;
@@ -3218,7 +3219,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 43 unmodified lines
3218 if (err < 0) {3219 if (err < 0) {
3219 av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");3220 av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");
3220 }3221 }
3221 av_dlog(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "3222 av_log(c->fc, AV_LOG_TRACE, "AVIndex stream %d, sample %d, offset %"PRIx64", dts %"PRId64", "
3222 "size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,3223 "size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
3223 offset, dts, sample_size, distance, keyframe);3224 offset, dts, sample_size, distance, keyframe);
3224 distance++;3225 distance++;
@@ -3332,7 +3333,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 107 unmodified lines
3332 if (!sc->elst_data)3333 if (!sc->elst_data)
3333 return AVERROR(ENOMEM);3334 return AVERROR(ENOMEM);
3334 3335
3335 av_dlog(c->fc, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);3336 av_log(c->fc, AV_LOG_TRACE, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, edit_count);
3336 for (i = 0; i < edit_count && !pb->eof_reached; i++) {3337 for (i = 0; i < edit_count && !pb->eof_reached; i++) {
3337 MOVElst *e = &sc->elst_data[i];3338 MOVElst *e = &sc->elst_data[i];
3338 3339
@@ -3344,7 +3345,7 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 5 unmodified lines
3344 e->time = (int32_t)avio_rb32(pb); /* media time */3345 e->time = (int32_t)avio_rb32(pb); /* media time */
3345 }3346 }
3346 e->rate = avio_rb32(pb) / 65536.0;3347 e->rate = avio_rb32(pb) / 65536.0;
3347 av_dlog(c->fc, "duration=%"PRId64" time=%"PRId64" rate=%f\n",3348 av_log(c->fc, AV_LOG_TRACE, "duration=%"PRId64" time=%"PRId64" rate=%f\n",
3348 e->duration, e->time, e->rate);3349 e->duration, e->time, e->rate);
3349 }3350 }
3350 sc->elst_count = i;3351 sc->elst_count = i;
@@ -3576,7 +3577,7 @@ static int mov_read_default(MOVContext *c, AVIOContext *pb, MOVAtom atom) · 225 unmodified lines
3576 total_size += 8;3577 total_size += 8;
3577 }3578 }
3578 }3579 }
3579 av_dlog(c->fc, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",3580 av_log(c->fc, AV_LOG_TRACE, "type: %08x '%.4s' parent:'%.4s' sz: %"PRId64" %"PRId64" %"PRId64"\n",
3580 a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size);3581 a.type, (char*)&a.type, (char*)&atom.type, a.size, total_size, atom.size);
3581 if (a.size == 0) {3582 if (a.size == 0) {
3582 a.size = atom.size - total_size + 8;3583 a.size = atom.size - total_size + 8;
@@ -4058,7 +4059,7 @@ static int mov_read_header(AVFormatContext *s) · 475 unmodified lines
4058 mov_read_close(s);4059 mov_read_close(s);
4059 return AVERROR_INVALIDDATA;4060 return AVERROR_INVALIDDATA;
4060 }4061 }
4061 av_dlog(mov->fc, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb));4062 av_log(mov->fc, AV_LOG_TRACE, "on_parse_exit_offset=%"PRId64"\n", avio_tell(pb));
4062 4063
4063 if (pb->seekable) {4064 if (pb->seekable) {
4064 if (mov->chapter_track > 0)4065 if (mov->chapter_track > 0)
@@ -4187,7 +4188,7 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) · 122 unmodified lines
4187 if (msc->pb && msc->current_sample < avst->nb_index_entries) {4188 if (msc->pb && msc->current_sample < avst->nb_index_entries) {
4188 AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample];4189 AVIndexEntry *current_sample = &avst->index_entries[msc->current_sample];
4189 int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale);4190 int64_t dts = av_rescale(current_sample->timestamp, AV_TIME_BASE, msc->time_scale);
4190 av_dlog(s, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);4191 av_log(s, AV_LOG_TRACE, "stream %d, sample %d, dts %"PRId64"\n", i, msc->current_sample, dts);
4191 if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||4192 if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
4192 (s->pb->seekable &&4193 (s->pb->seekable &&
4193 ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&4194 ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
@@ -4221,7 +4222,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) · 27 unmodified lines
4221 if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||4222 if (mov_read_default(mov, s->pb, (MOVAtom){ AV_RL32("root"), INT64_MAX }) < 0 ||
4222 avio_feof(s->pb))4223 avio_feof(s->pb))
4223 return AVERROR_EOF;4224 return AVERROR_EOF;
4224 av_dlog(s, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));4225 av_log(s, AV_LOG_TRACE, "read fragments, offset 0x%"PRIx64"\n", avio_tell(s->pb));
4225 goto retry;4226 goto retry;
4226 }4227 }
4227 sc = st->priv_data;4228 sc = st->priv_data;
@@ -4288,7 +4289,7 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) · 60 unmodified lines
4288 goto retry;4289 goto retry;
4289 pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;4290 pkt->flags |= sample->flags & AVINDEX_KEYFRAME ? AV_PKT_FLAG_KEY : 0;
4290 pkt->pos = sample->pos;4291 pkt->pos = sample->pos;
4291 av_dlog(s, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",4292 av_log(s, AV_LOG_TRACE, "stream %d, pts %"PRId64", dts %"PRId64", pos 0x%"PRIx64", duration %d\n",
4292 pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration);4293 pkt->stream_index, pkt->pts, pkt->dts, pkt->pos, pkt->duration);
4293 return 0;4294 return 0;
4294}4295}
@@ -4300,13 +4301,13 @@ static int mov_seek_stream(AVFormatContext *s, AVStream *st, int64_t timestamp, · 5 unmodified lines
4300 int i;4301 int i;
4301 4302
4302 sample = av_index_search_timestamp(st, timestamp, flags);4303 sample = av_index_search_timestamp(st, timestamp, flags);
4303 av_dlog(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);4304 av_log(s, AV_LOG_TRACE, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
4304 if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)4305 if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
4305 sample = 0;4306 sample = 0;
4306 if (sample < 0) /* not sure what to do */4307 if (sample < 0) /* not sure what to do */
4307 return AVERROR_INVALIDDATA;4308 return AVERROR_INVALIDDATA;
4308 sc->current_sample = sample;4309 sc->current_sample = sample;
4309 av_dlog(s, "stream %d, found sample %d\n", st->index, sc->current_sample);4310 av_log(s, AV_LOG_TRACE, "stream %d, found sample %d\n", st->index, sc->current_sample);
4310 /* adjust ctts index */4311 /* adjust ctts index */
4311 if (sc->ctts_data) {4312 if (sc->ctts_data) {
4312 time_sample = 0;4313 time_sample = 0;
libavformat/mov_chan.c+1−1
@@ -557,7 +557,7 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st, · 556 unmodified lines
557 bitmap = avio_rb32(pb);557 bitmap = avio_rb32(pb);
558 num_descr = avio_rb32(pb);558 num_descr = avio_rb32(pb);
559 559
560 av_dlog(s, "chan: layout=%u bitmap=%u num_descr=%u\n",560 av_log(s, AV_LOG_TRACE, "chan: layout=%u bitmap=%u num_descr=%u\n",
561 layout_tag, bitmap, num_descr);561 layout_tag, bitmap, num_descr);
562 562
563 if (size < 12ULL + num_descr * 20ULL)563 if (size < 12ULL + num_descr * 20ULL)
libavformat/mpeg.c+3−3
@@ -625,7 +625,7 @@ found: · 624 unmodified lines
625 pkt->dts = dts;625 pkt->dts = dts;
626 pkt->pos = dummy_pos;626 pkt->pos = dummy_pos;
627 pkt->stream_index = st->index;627 pkt->stream_index = st->index;
628 av_dlog(s, "%d: pts=%0.3f dts=%0.3f size=%d\n",628 av_log(s, AV_LOG_TRACE, "%d: pts=%0.3f dts=%0.3f size=%d\n",
629 pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,629 pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0,
630 pkt->size);630 pkt->size);
631 631
@@ -645,7 +645,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, · 13 unmodified lines
645 for (;;) {645 for (;;) {
646 len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);646 len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts);
647 if (len < 0) {647 if (len < 0) {
648 av_dlog(s, "none (ret=%d)\n", len);648 av_log(s, AV_LOG_TRACE, "none (ret=%d)\n", len);
649 return AV_NOPTS_VALUE;649 return AV_NOPTS_VALUE;
650 }650 }
651 if (startcode == s->streams[stream_index]->id &&651 if (startcode == s->streams[stream_index]->id &&
@@ -654,7 +654,7 @@ static int64_t mpegps_read_dts(AVFormatContext *s, int stream_index, · 2 unmodified lines
654 }654 }
655 avio_skip(s->pb, len);655 avio_skip(s->pb, len);
656 }656 }
657 av_dlog(s, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",657 av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" dts=0x%"PRIx64" %0.3f\n",
658 pos, dts, dts / 90000.0);658 pos, dts, dts / 90000.0);
659 *ppos = pos;659 *ppos = pos;
660 return dts;660 return dts;
libavformat/mpegenc.c+4−4
@@ -604,7 +604,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, · 603 unmodified lines
604 604
605 id = stream->id;605 id = stream->id;
606 606
607 av_dlog(ctx, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0);607 av_log(ctx, AV_LOG_TRACE, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0);
608 608
609 buf_ptr = buffer;609 buf_ptr = buffer;
610 610
@@ -1012,7 +1012,7 @@ retry: · 401 unmodified lines
1012 }1012 }
1013 1013
1014 if (best_dts < INT64_MAX) {1014 if (best_dts < INT64_MAX) {
1015 av_dlog(ctx, "bumping scr, scr:%f, dts:%f\n",1015 av_log(ctx, AV_LOG_TRACE, "bumping scr, scr:%f, dts:%f\n",
1016 scr / 90000.0, best_dts / 90000.0);1016 scr / 90000.0, best_dts / 90000.0);
1017 1017
1018 if (scr >= best_dts + 1 && !ignore_constraints) {1018 if (scr >= best_dts + 1 && !ignore_constraints) {
@@ -1052,7 +1052,7 @@ retry: · 33 unmodified lines
1052 }1052 }
1053 1053
1054 if (timestamp_packet) {1054 if (timestamp_packet) {
1055 av_dlog(ctx, "dts:%f pts:%f scr:%f stream:%d\n",1055 av_log(ctx, AV_LOG_TRACE, "dts:%f pts:%f scr:%f stream:%d\n",
1056 timestamp_packet->dts / 90000.0,1056 timestamp_packet->dts / 90000.0,
1057 timestamp_packet->pts / 90000.0,1057 timestamp_packet->pts / 90000.0,
1058 scr / 90000.0, best_i);1058 scr / 90000.0, best_i);
@@ -1132,7 +1132,7 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, AVPacket *pkt) · 73 unmodified lines
1132 if (dts != AV_NOPTS_VALUE) dts += preload;1132 if (dts != AV_NOPTS_VALUE) dts += preload;
1133 if (pts != AV_NOPTS_VALUE) pts += preload;1133 if (pts != AV_NOPTS_VALUE) pts += preload;
1134 1134
1135 av_dlog(ctx, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n",1135 av_log(ctx, AV_LOG_TRACE, "dts:%f pts:%f flags:%d stream:%d nopts:%d\n",
1136 dts / 90000.0, pts / 90000.0, pkt->flags,1136 dts / 90000.0, pts / 90000.0, pkt->flags,
1137 pkt->stream_index, pts != AV_NOPTS_VALUE);1137 pkt->stream_index, pts != AV_NOPTS_VALUE);
1138 if (!stream->premux_packet)1138 if (!stream->premux_packet)
libavformat/mpegts.c+17−17
@@ -435,7 +435,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid, · 434 unmodified lines
435{435{
436 MpegTSFilter *filter;436 MpegTSFilter *filter;
437 437
438 av_dlog(ts->stream, "Filter: pid=0x%x\n", pid);438 av_log(ts->stream, AV_LOG_TRACE, "Filter: pid=0x%x\n", pid);
439 439
440 if (pid >= NB_PID_MAX || ts->pids[pid])440 if (pid >= NB_PID_MAX || ts->pids[pid])
441 return NULL;441 return NULL;
@@ -556,7 +556,7 @@ static int get_packet_size(const uint8_t *buf, int size) · 114 unmodified lines
556 score = analyze(buf, size, TS_PACKET_SIZE, NULL, 0);556 score = analyze(buf, size, TS_PACKET_SIZE, NULL, 0);
557 dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL, 0);557 dvhs_score = analyze(buf, size, TS_DVHS_PACKET_SIZE, NULL, 0);
558 fec_score = analyze(buf, size, TS_FEC_PACKET_SIZE, NULL, 0);558 fec_score = analyze(buf, size, TS_FEC_PACKET_SIZE, NULL, 0);
559 av_dlog(NULL, "score: %d, dvhs_score: %d, fec_score: %d \n",559 av_log(NULL, AV_LOG_TRACE, "score: %d, dvhs_score: %d, fec_score: %d \n",
560 score, dvhs_score, fec_score);560 score, dvhs_score, fec_score);
561 561
562 if (score > fec_score && score > dvhs_score)562 if (score > fec_score && score > dvhs_score)
@@ -976,7 +976,7 @@ static int mpegts_push_data(MpegTSFilter *filter, · 413 unmodified lines
976 pes->header[2] == 0x01) {976 pes->header[2] == 0x01) {
977 /* it must be an mpeg2 PES stream */977 /* it must be an mpeg2 PES stream */
978 code = pes->header[3] | 0x100;978 code = pes->header[3] | 0x100;
979 av_dlog(pes->stream, "pid=%x pes_code=%#x\n", pes->pid,979 av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,
980 code);980 code);
981 981
982 if ((pes->st && pes->st->discard == AVDISCARD_ALL &&982 if ((pes->st && pes->st->discard == AVDISCARD_ALL &&
@@ -1015,7 +1015,7 @@ static int mpegts_push_data(MpegTSFilter *filter, · 32 unmodified lines
1015 code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */1015 code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
1016 pes->state = MPEGTS_PESHEADER;1016 pes->state = MPEGTS_PESHEADER;
1017 if (pes->st->codec->codec_id == AV_CODEC_ID_NONE && !pes->st->request_probe) {1017 if (pes->st->codec->codec_id == AV_CODEC_ID_NONE && !pes->st->request_probe) {
1018 av_dlog(pes->stream,1018 av_log(pes->stream, AV_LOG_TRACE,
1019 "pid=%x stream_type=%x probing\n",1019 "pid=%x stream_type=%x probing\n",
1020 pes->pid,1020 pes->pid,
1021 pes->stream_type);1021 pes->stream_type);
@@ -1552,7 +1552,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 530 unmodified lines
1552 if (desc_end > desc_list_end)1552 if (desc_end > desc_list_end)
1553 return AVERROR_INVALIDDATA;1553 return AVERROR_INVALIDDATA;
1554 1554
1555 av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);1555 av_log(fc, AV_LOG_TRACE, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
1556 1556
1557 if ((st->codec->codec_id == AV_CODEC_ID_NONE || st->request_probe > 0) &&1557 if ((st->codec->codec_id == AV_CODEC_ID_NONE || st->request_probe > 0) &&
1558 stream_type == STREAM_TYPE_PRIVATE_DATA)1558 stream_type == STREAM_TYPE_PRIVATE_DATA)
@@ -1730,7 +1730,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type · 171 unmodified lines
1730 break;1730 break;
1731 case 0x05: /* registration descriptor */1731 case 0x05: /* registration descriptor */
1732 st->codec->codec_tag = bytestream_get_le32(pp);1732 st->codec->codec_tag = bytestream_get_le32(pp);
1733 av_dlog(fc, "reg_desc=%.4s\n", (char *)&st->codec->codec_tag);1733 av_log(fc, AV_LOG_TRACE, "reg_desc=%.4s\n", (char *)&st->codec->codec_tag);
1734 if (st->codec->codec_id == AV_CODEC_ID_NONE)1734 if (st->codec->codec_id == AV_CODEC_ID_NONE)
1735 mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);1735 mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);
1736 break;1736 break;
@@ -1799,7 +1799,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 62 unmodified lines
1799 Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { { 0 } };1799 Mp4Descr mp4_descr[MAX_MP4_DESCR_COUNT] = { { 0 } };
1800 int i;1800 int i;
1801 1801
1802 av_dlog(ts->stream, "PMT: len %i\n", section_len);1802 av_log(ts->stream, AV_LOG_TRACE, "PMT: len %i\n", section_len);
1803 hex_dump_debug(ts->stream, section, section_len);1803 hex_dump_debug(ts->stream, section, section_len);
1804 1804
1805 p_end = section + section_len - 4;1805 p_end = section + section_len - 4;
@@ -1807,7 +1807,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 1 unmodified line
1807 if (parse_section_header(h, &p, p_end) < 0)1807 if (parse_section_header(h, &p, p_end) < 0)
1808 return;1808 return;
1809 1809
1810 av_dlog(ts->stream, "sid=0x%x sec_num=%d/%d version=%d\n",1810 av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x sec_num=%d/%d version=%d\n",
1811 h->id, h->sec_num, h->last_sec_num, h->version);1811 h->id, h->sec_num, h->last_sec_num, h->version);
1812 1812
1813 if (h->tid != PMT_TID)1813 if (h->tid != PMT_TID)
@@ -1825,7 +1825,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 11 unmodified lines
1825 add_pid_to_pmt(ts, h->id, pcr_pid);1825 add_pid_to_pmt(ts, h->id, pcr_pid);
1826 set_pcr_pid(ts->stream, h->id, pcr_pid);1826 set_pcr_pid(ts->stream, h->id, pcr_pid);
1827 1827
1828 av_dlog(ts->stream, "pcr_pid=0x%x\n", pcr_pid);1828 av_log(ts->stream, AV_LOG_TRACE, "pcr_pid=0x%x\n", pcr_pid);
1829 1829
1830 program_info_length = get16(&p, p_end);1830 program_info_length = get16(&p, p_end);
1831 if (program_info_length < 0)1831 if (program_info_length < 0)
@@ -1836,7 +1836,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 4 unmodified lines
1836 tag = get8(&p, p_end);1836 tag = get8(&p, p_end);
1837 len = get8(&p, p_end);1837 len = get8(&p, p_end);
1838 1838
1839 av_dlog(ts->stream, "program tag: 0x%02x len=%d\n", tag, len);1839 av_log(ts->stream, AV_LOG_TRACE, "program tag: 0x%02x len=%d\n", tag, len);
1840 1840
1841 if (len > program_info_length - 2)1841 if (len > program_info_length - 2)
1842 // something else is broken, exit the program_descriptors_loop1842 // something else is broken, exit the program_descriptors_loop
@@ -1960,7 +1960,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 117 unmodified lines
1960 int sid, pmt_pid;1960 int sid, pmt_pid;
1961 AVProgram *program;1961 AVProgram *program;
1962 1962
1963 av_dlog(ts->stream, "PAT:\n");1963 av_log(ts->stream, AV_LOG_TRACE, "PAT:\n");
1964 hex_dump_debug(ts->stream, section, section_len);1964 hex_dump_debug(ts->stream, section, section_len);
1965 1965
1966 p_end = section + section_len - 4;1966 p_end = section + section_len - 4;
@@ -1987,7 +1987,7 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 20 unmodified lines
1987 if (pmt_pid == ts->current_pid)1987 if (pmt_pid == ts->current_pid)
1988 break;1988 break;
1989 1989
1990 av_dlog(ts->stream, "sid=0x%x pid=0x%x\n", sid, pmt_pid);1990 av_log(ts->stream, AV_LOG_TRACE, "sid=0x%x pid=0x%x\n", sid, pmt_pid);
1991 1991
1992 if (sid == 0x0000) {1992 if (sid == 0x0000) {
1993 /* NIT info */1993 /* NIT info */
@@ -2032,7 +2032,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 38 unmodified lines
2032 int onid, val, sid, desc_list_len, desc_tag, desc_len, service_type;2032 int onid, val, sid, desc_list_len, desc_tag, desc_len, service_type;
2033 char *name, *provider_name;2033 char *name, *provider_name;
2034 2034
2035 av_dlog(ts->stream, "SDT:\n");2035 av_log(ts->stream, AV_LOG_TRACE, "SDT:\n");
2036 hex_dump_debug(ts->stream, section, section_len);2036 hex_dump_debug(ts->stream, section, section_len);
2037 2037
2038 p_end = section + section_len - 4;2038 p_end = section + section_len - 4;
@@ -2072,7 +2072,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len · 33 unmodified lines
2072 if (desc_len < 0 || desc_end > desc_list_end)2072 if (desc_len < 0 || desc_end > desc_list_end)
2073 break;2073 break;
2074 2074
2075 av_dlog(ts->stream, "tag: 0x%02x len=%d\n",2075 av_log(ts->stream, AV_LOG_TRACE, "tag: 0x%02x len=%d\n",
2076 desc_tag, desc_len);2076 desc_tag, desc_len);
2077 2077
2078 switch (desc_tag) {2078 switch (desc_tag) {
@@ -2340,7 +2340,7 @@ static int handle_packets(MpegTSContext *ts, int64_t nb_packets) · 261 unmodified lines
2340 2340
2341 if (avio_tell(s->pb) != ts->last_pos) {2341 if (avio_tell(s->pb) != ts->last_pos) {
2342 int i;2342 int i;
2343 av_dlog(ts->stream, "Skipping after seek\n");2343 av_log(ts->stream, AV_LOG_TRACE, "Skipping after seek\n");
2344 /* seek detected, flush pes buffer */2344 /* seek detected, flush pes buffer */
2345 for (i = 0; i < NB_PID_MAX; i++) {2345 for (i = 0; i < NB_PID_MAX; i++) {
2346 if (ts->pids[i]) {2346 if (ts->pids[i]) {
@@ -2489,7 +2489,7 @@ static int mpegts_read_header(AVFormatContext *s) · 142 unmodified lines
2489 2489
2490 ts->auto_guess = 1;2490 ts->auto_guess = 1;
2491 2491
2492 av_dlog(ts->stream, "tuning done\n");2492 av_log(ts->stream, AV_LOG_TRACE, "tuning done\n");
2493 2493
2494 s->ctx_flags |= AVFMTCTX_NOHEADER;2494 s->ctx_flags |= AVFMTCTX_NOHEADER;
2495 } else {2495 } else {
@@ -2540,7 +2540,7 @@ static int mpegts_read_header(AVFormatContext *s) · 44 unmodified lines
2540 s->bit_rate = TS_PACKET_SIZE * 8 * 27e6 / ts->pcr_incr;2540 s->bit_rate = TS_PACKET_SIZE * 8 * 27e6 / ts->pcr_incr;
2541 st->codec->bit_rate = s->bit_rate;2541 st->codec->bit_rate = s->bit_rate;
2542 st->start_time = ts->cur_pcr;2542 st->start_time = ts->cur_pcr;
2543 av_dlog(ts->stream, "start=%0.3f pcr=%0.3f incr=%d\n",2543 av_log(ts->stream, AV_LOG_TRACE, "start=%0.3f pcr=%0.3f incr=%d\n",
2544 st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);2544 st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr);
2545 }2545 }
2546 2546
libavformat/mpegtsenc.c+1−1
@@ -1281,7 +1281,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt) · 1280 unmodified lines
1281 1281
1282 do {1282 do {
1283 p = avpriv_find_start_code(p, buf_end, &state);1283 p = avpriv_find_start_code(p, buf_end, &state);
1284 av_dlog(s, "nal %d\n", state & 0x1f);1284 av_log(s, AV_LOG_TRACE, "nal %d\n", state & 0x1f);
1285 if ((state & 0x1f) == 7)1285 if ((state & 0x1f) == 7)
1286 extradd = 0;1286 extradd = 0;
1287 } while (p < buf_end && (state & 0x1f) != 9 &&1287 } while (p < buf_end && (state & 0x1f) != 9 &&
libavformat/mux.c+4−4
@@ -442,7 +442,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt) · 441 unmodified lines
442 int num, den, i;442 int num, den, i;
443 int frame_size;443 int frame_size;
444 444
445 av_dlog(s, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",445 av_log(s, AV_LOG_TRACE, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
446 av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);446 av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
447 447
448 if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {448 if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
@@ -502,7 +502,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt) · 53 unmodified lines
502 return AVERROR(EINVAL);502 return AVERROR(EINVAL);
503 }503 }
504 504
505 av_dlog(s, "av_write_frame: pts2:%s dts2:%s\n",505 av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%s dts2:%s\n",
506 av_ts2str(pkt->pts), av_ts2str(pkt->dts));506 av_ts2str(pkt->pts), av_ts2str(pkt->dts));
507 st->cur_dts = pkt->dts;507 st->cur_dts = pkt->dts;
508 st->pts.val = pkt->dts;508 st->pts.val = pkt->dts;
@@ -876,7 +876,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) · 367 unmodified lines
876 if (pkt) {876 if (pkt) {
877 AVStream *st = s->streams[pkt->stream_index];877 AVStream *st = s->streams[pkt->stream_index];
878 878
879 av_dlog(s, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",879 av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
880 pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));880 pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
881 if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))881 if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
882 goto fail;882 goto fail;
@@ -886,7 +886,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt) · 3 unmodified lines
886 goto fail;886 goto fail;
887 }887 }
888 } else {888 } else {
889 av_dlog(s, "av_interleaved_write_frame FLUSH\n");889 av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame FLUSH\n");
890 flush = 1;890 flush = 1;
891 }891 }
892 892
libavformat/mxfdec.c+18−18
@@ -600,7 +600,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size · 599 unmodified lines
600 }600 }
601 }601 }
602 602
603 av_dlog(mxf->fc,603 av_log(mxf->fc, AV_LOG_TRACE,
604 "PartitionPack: ThisPartition = 0x%"PRIX64604 "PartitionPack: ThisPartition = 0x%"PRIX64
605 ", PreviousPartition = 0x%"PRIX64", "605 ", PreviousPartition = 0x%"PRIX64", "
606 "FooterPartition = 0x%"PRIX64", IndexSID = %i, BodySID = %i\n",606 "FooterPartition = 0x%"PRIX64", IndexSID = %i, BodySID = %i\n",
@@ -910,32 +910,32 @@ static int mxf_read_index_table_segment(void *arg, AVIOContext *pb, int tag, int · 303 unmodified lines
910 switch(tag) {910 switch(tag) {
911 case 0x3F05:911 case 0x3F05:
912 segment->edit_unit_byte_count = avio_rb32(pb);912 segment->edit_unit_byte_count = avio_rb32(pb);
913 av_dlog(NULL, "EditUnitByteCount %d\n", segment->edit_unit_byte_count);913 av_log(NULL, AV_LOG_TRACE, "EditUnitByteCount %d\n", segment->edit_unit_byte_count);
914 break;914 break;
915 case 0x3F06:915 case 0x3F06:
916 segment->index_sid = avio_rb32(pb);916 segment->index_sid = avio_rb32(pb);
917 av_dlog(NULL, "IndexSID %d\n", segment->index_sid);917 av_log(NULL, AV_LOG_TRACE, "IndexSID %d\n", segment->index_sid);
918 break;918 break;
919 case 0x3F07:919 case 0x3F07:
920 segment->body_sid = avio_rb32(pb);920 segment->body_sid = avio_rb32(pb);
921 av_dlog(NULL, "BodySID %d\n", segment->body_sid);921 av_log(NULL, AV_LOG_TRACE, "BodySID %d\n", segment->body_sid);
922 break;922 break;
923 case 0x3F0A:923 case 0x3F0A:
924 av_dlog(NULL, "IndexEntryArray found\n");924 av_log(NULL, AV_LOG_TRACE, "IndexEntryArray found\n");
925 return mxf_read_index_entry_array(pb, segment);925 return mxf_read_index_entry_array(pb, segment);
926 case 0x3F0B:926 case 0x3F0B:
927 segment->index_edit_rate.num = avio_rb32(pb);927 segment->index_edit_rate.num = avio_rb32(pb);
928 segment->index_edit_rate.den = avio_rb32(pb);928 segment->index_edit_rate.den = avio_rb32(pb);
929 av_dlog(NULL, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,929 av_log(NULL, AV_LOG_TRACE, "IndexEditRate %d/%d\n", segment->index_edit_rate.num,
930 segment->index_edit_rate.den);930 segment->index_edit_rate.den);
931 break;931 break;
932 case 0x3F0C:932 case 0x3F0C:
933 segment->index_start_position = avio_rb64(pb);933 segment->index_start_position = avio_rb64(pb);
934 av_dlog(NULL, "IndexStartPosition %"PRId64"\n", segment->index_start_position);934 av_log(NULL, AV_LOG_TRACE, "IndexStartPosition %"PRId64"\n", segment->index_start_position);
935 break;935 break;
936 case 0x3F0D:936 case 0x3F0D:
937 segment->index_duration = avio_rb64(pb);937 segment->index_duration = avio_rb64(pb);
938 av_dlog(NULL, "IndexDuration %"PRId64"\n", segment->index_duration);938 av_log(NULL, AV_LOG_TRACE, "IndexDuration %"PRId64"\n", segment->index_duration);
939 break;939 break;
940 }940 }
941 return 0;941 return 0;
@@ -949,7 +949,7 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor) · 7 unmodified lines
949 do {949 do {
950 code = avio_r8(pb);950 code = avio_r8(pb);
951 value = avio_r8(pb);951 value = avio_r8(pb);
952 av_dlog(NULL, "pixel layout: code %#x\n", code);952 av_log(NULL, AV_LOG_TRACE, "pixel layout: code %#x\n", code);
953 953
954 if (ofs <= 14) {954 if (ofs <= 14) {
955 layout[ofs++] = code;955 layout[ofs++] = code;
@@ -1780,7 +1780,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 824 unmodified lines
1780 MXFPackage *material_package = NULL;1780 MXFPackage *material_package = NULL;
1781 int i, j, k, ret;1781 int i, j, k, ret;
1782 1782
1783 av_dlog(mxf->fc, "metadata sets count %d\n", mxf->metadata_sets_count);1783 av_log(mxf->fc, AV_LOG_TRACE, "metadata sets count %d\n", mxf->metadata_sets_count);
1784 /* TODO: handle multiple material packages (OP3x) */1784 /* TODO: handle multiple material packages (OP3x) */
1785 for (i = 0; i < mxf->packages_count; i++) {1785 for (i = 0; i < mxf->packages_count; i++) {
1786 material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage);1786 material_package = mxf_resolve_strong_ref(mxf, &mxf->packages_refs[i], MaterialPackage);
@@ -1851,7 +1851,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 64 unmodified lines
1851 1851
1852 source_package = mxf_resolve_source_package(mxf, component->source_package_uid);1852 source_package = mxf_resolve_source_package(mxf, component->source_package_uid);
1853 if (!source_package) {1853 if (!source_package) {
1854 av_dlog(mxf->fc, "material track %d: no corresponding source package found\n", material_track->track_id);1854 av_log(mxf->fc, AV_LOG_TRACE, "material track %d: no corresponding source package found\n", material_track->track_id);
1855 break;1855 break;
1856 }1856 }
1857 for (k = 0; k < source_package->tracks_count; k++) {1857 for (k = 0; k < source_package->tracks_count; k++) {
@@ -2272,7 +2272,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF · 414 unmodified lines
2272 uint64_t next = avio_tell(pb) + size;2272 uint64_t next = avio_tell(pb) + size;
2273 UID uid = {0};2273 UID uid = {0};
2274 2274
2275 av_dlog(mxf->fc, "local tag %#04x size %d\n", tag, size);2275 av_log(mxf->fc, AV_LOG_TRACE, "local tag %#04x size %d\n", tag, size);
2276 if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */2276 if (!size) { /* ignore empty tag, needed for some files with empty UMID tag */
2277 av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag);2277 av_log(mxf->fc, AV_LOG_ERROR, "local tag %#04x with 0 size\n", tag);
2278 continue;2278 continue;
@@ -2283,7 +2283,7 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF · 4 unmodified lines
2283 int local_tag = AV_RB16(mxf->local_tags+i*18);2283 int local_tag = AV_RB16(mxf->local_tags+i*18);
2284 if (local_tag == tag) {2284 if (local_tag == tag) {
2285 memcpy(uid, mxf->local_tags+i*18+2, 16);2285 memcpy(uid, mxf->local_tags+i*18+2, 16);
2286 av_dlog(mxf->fc, "local tag %#04x\n", local_tag);2286 av_log(mxf->fc, AV_LOG_TRACE, "local tag %#04x\n", local_tag);
2287 PRINT_KEY(mxf->fc, "uid", uid);2287 PRINT_KEY(mxf->fc, "uid", uid);
2288 }2288 }
2289 }2289 }
@@ -2379,7 +2379,7 @@ static int mxf_seek_to_previous_partition(MXFContext *mxf) · 89 unmodified lines
2379 avio_seek(pb, mxf->run_in + mxf->current_partition->previous_partition, SEEK_SET);2379 avio_seek(pb, mxf->run_in + mxf->current_partition->previous_partition, SEEK_SET);
2380 mxf->current_partition = NULL;2380 mxf->current_partition = NULL;
2381 2381
2382 av_dlog(mxf->fc, "seeking to previous partition\n");2382 av_log(mxf->fc, AV_LOG_TRACE, "seeking to previous partition\n");
2383 2383
2384 /* Make sure this is actually a PartitionPack, and if so parse it.2384 /* Make sure this is actually a PartitionPack, and if so parse it.
2385 * See deadlock2.mxf2385 * See deadlock2.mxf
@@ -2423,11 +2423,11 @@ static int mxf_parse_handle_essence(MXFContext *mxf) · 37 unmodified lines
2423 return mxf_seek_to_previous_partition(mxf);2423 return mxf_seek_to_previous_partition(mxf);
2424 } else {2424 } else {
2425 if (!mxf->footer_partition) {2425 if (!mxf->footer_partition) {
2426 av_dlog(mxf->fc, "no FooterPartition\n");2426 av_log(mxf->fc, AV_LOG_TRACE, "no FooterPartition\n");
2427 return 0;2427 return 0;
2428 }2428 }
2429 2429
2430 av_dlog(mxf->fc, "seeking to FooterPartition\n");2430 av_log(mxf->fc, AV_LOG_TRACE, "seeking to FooterPartition\n");
2431 2431
2432 /* remember where we were so we don't end up seeking further back than this */2432 /* remember where we were so we don't end up seeking further back than this */
2433 mxf->last_forward_tell = avio_tell(pb);2433 mxf->last_forward_tell = avio_tell(pb);
@@ -2680,7 +2680,7 @@ static int mxf_read_header(AVFormatContext *s) · 246 unmodified lines
2680 }2680 }
2681 2681
2682 PRINT_KEY(s, "read header", klv.key);2682 PRINT_KEY(s, "read header", klv.key);
2683 av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);2683 av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
2684 if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||2684 if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) ||
2685 IS_KLV_KEY(klv.key, mxf_essence_element_key) ||2685 IS_KLV_KEY(klv.key, mxf_essence_element_key) ||
2686 IS_KLV_KEY(klv.key, mxf_avid_essence_element_key) ||2686 IS_KLV_KEY(klv.key, mxf_avid_essence_element_key) ||
@@ -2891,7 +2891,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt) · 204 unmodified lines
2891 2891
2892 while ((ret = klv_read_packet(&klv, s->pb)) == 0) {2892 while ((ret = klv_read_packet(&klv, s->pb)) == 0) {
2893 PRINT_KEY(s, "read packet", klv.key);2893 PRINT_KEY(s, "read packet", klv.key);
2894 av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);2894 av_log(s, AV_LOG_TRACE, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset);
2895 if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {2895 if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key)) {
2896 ret = mxf_decrypt_triplet(s, pkt, &klv);2896 ret = mxf_decrypt_triplet(s, pkt, &klv);
2897 if (ret < 0) {2897 if (ret < 0) {
libavformat/mxfenc.c+1−1
@@ -2560,7 +2560,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket · 2559 unmodified lines
2560 }2560 }
2561 2561
2562 *out = pktl->pkt;2562 *out = pktl->pkt;
2563 av_dlog(s, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);2563 av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
2564 s->internal->packet_buffer = pktl->next;2564 s->internal->packet_buffer = pktl->next;
2565 if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)2565 if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
2566 s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;2566 s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;
libavformat/nsvdec.c+35−35
@@ -213,7 +213,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = { · 212 unmodified lines
213static int nsv_read_chunk(AVFormatContext *s, int fill_header);213static int nsv_read_chunk(AVFormatContext *s, int fill_header);
214 214
215#define print_tag(str, tag, size) \215#define print_tag(str, tag, size) \
216 av_dlog(NULL, "%s: tag=%c%c%c%c\n", \216 av_log(NULL, AV_LOG_TRACE, "%s: tag=%c%c%c%c\n", \
217 str, tag & 0xff, \217 str, tag & 0xff, \
218 (tag >> 8) & 0xff, \218 (tag >> 8) & 0xff, \
219 (tag >> 16) & 0xff, \219 (tag >> 16) & 0xff, \
@@ -227,41 +227,41 @@ static int nsv_resync(AVFormatContext *s) · 7 unmodified lines
227 uint32_t v = 0;227 uint32_t v = 0;
228 int i;228 int i;
229 229
230 av_dlog(s, "%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, avio_tell(pb), nsv->state);230 av_log(s, AV_LOG_TRACE, "%s(), offset = %"PRId64", state = %d\n", __FUNCTION__, avio_tell(pb), nsv->state);
231 231
232 //nsv->state = NSV_UNSYNC;232 //nsv->state = NSV_UNSYNC;
233 233
234 for (i = 0; i < NSV_MAX_RESYNC; i++) {234 for (i = 0; i < NSV_MAX_RESYNC; i++) {
235 if (avio_feof(pb)) {235 if (avio_feof(pb)) {
236 av_dlog(s, "NSV EOF\n");236 av_log(s, AV_LOG_TRACE, "NSV EOF\n");
237 nsv->state = NSV_UNSYNC;237 nsv->state = NSV_UNSYNC;
238 return -1;238 return -1;
239 }239 }
240 v <<= 8;240 v <<= 8;
241 v |= avio_r8(pb);241 v |= avio_r8(pb);
242 if (i < 8) {242 if (i < 8) {
243 av_dlog(s, "NSV resync: [%d] = %02x\n", i, v & 0x0FF);243 av_log(s, AV_LOG_TRACE, "NSV resync: [%d] = %02x\n", i, v & 0x0FF);
244 }244 }
245 245
246 if ((v & 0x0000ffff) == 0xefbe) { /* BEEF */246 if ((v & 0x0000ffff) == 0xefbe) { /* BEEF */
247 av_dlog(s, "NSV resynced on BEEF after %d bytes\n", i+1);247 av_log(s, AV_LOG_TRACE, "NSV resynced on BEEF after %d bytes\n", i+1);
248 nsv->state = NSV_FOUND_BEEF;248 nsv->state = NSV_FOUND_BEEF;
249 return 0;249 return 0;
250 }250 }
251 /* we read as big-endian, thus the MK*BE* */251 /* we read as big-endian, thus the MK*BE* */
252 if (v == TB_NSVF) { /* NSVf */252 if (v == TB_NSVF) { /* NSVf */
253 av_dlog(s, "NSV resynced on NSVf after %d bytes\n", i+1);253 av_log(s, AV_LOG_TRACE, "NSV resynced on NSVf after %d bytes\n", i+1);
254 nsv->state = NSV_FOUND_NSVF;254 nsv->state = NSV_FOUND_NSVF;
255 return 0;255 return 0;
256 }256 }
257 if (v == MKBETAG('N', 'S', 'V', 's')) { /* NSVs */257 if (v == MKBETAG('N', 'S', 'V', 's')) { /* NSVs */
258 av_dlog(s, "NSV resynced on NSVs after %d bytes\n", i+1);258 av_log(s, AV_LOG_TRACE, "NSV resynced on NSVs after %d bytes\n", i+1);
259 nsv->state = NSV_FOUND_NSVS;259 nsv->state = NSV_FOUND_NSVS;
260 return 0;260 return 0;
261 }261 }
262 262
263 }263 }
264 av_dlog(s, "NSV sync lost\n");264 av_log(s, AV_LOG_TRACE, "NSV sync lost\n");
265 return -1;265 return -1;
266}266}
267 267
@@ -276,7 +276,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 8 unmodified lines
276 int table_entries;276 int table_entries;
277 int table_entries_used;277 int table_entries_used;
278 278
279 av_dlog(s, "%s()\n", __FUNCTION__);279 av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
280 280
281 nsv->state = NSV_UNSYNC; /* in case we fail */281 nsv->state = NSV_UNSYNC; /* in case we fail */
282 282
@@ -287,22 +287,22 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 4 unmodified lines
287 287
288 //s->file_size = (uint32_t)avio_rl32(pb);288 //s->file_size = (uint32_t)avio_rl32(pb);
289 file_size = (uint32_t)avio_rl32(pb);289 file_size = (uint32_t)avio_rl32(pb);
290 av_dlog(s, "NSV NSVf chunk_size %u\n", size);290 av_log(s, AV_LOG_TRACE, "NSV NSVf chunk_size %u\n", size);
291 av_dlog(s, "NSV NSVf file_size %u\n", file_size);291 av_log(s, AV_LOG_TRACE, "NSV NSVf file_size %u\n", file_size);
292 292
293 nsv->duration = duration = avio_rl32(pb); /* in ms */293 nsv->duration = duration = avio_rl32(pb); /* in ms */
294 av_dlog(s, "NSV NSVf duration %"PRId64" ms\n", duration);294 av_log(s, AV_LOG_TRACE, "NSV NSVf duration %"PRId64" ms\n", duration);
295 // XXX: store it in AVStreams295 // XXX: store it in AVStreams
296 296
297 strings_size = avio_rl32(pb);297 strings_size = avio_rl32(pb);
298 table_entries = avio_rl32(pb);298 table_entries = avio_rl32(pb);
299 table_entries_used = avio_rl32(pb);299 table_entries_used = avio_rl32(pb);
300 av_dlog(s, "NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",300 av_log(s, AV_LOG_TRACE, "NSV NSVf info-strings size: %d, table entries: %d, bis %d\n",
301 strings_size, table_entries, table_entries_used);301 strings_size, table_entries, table_entries_used);
302 if (avio_feof(pb))302 if (avio_feof(pb))
303 return -1;303 return -1;
304 304
305 av_dlog(s, "NSV got header; filepos %"PRId64"\n", avio_tell(pb));305 av_log(s, AV_LOG_TRACE, "NSV got header; filepos %"PRId64"\n", avio_tell(pb));
306 306
307 if (strings_size > 0) {307 if (strings_size > 0) {
308 char *strings; /* last byte will be '\0' to play safe with str*() */308 char *strings; /* last byte will be '\0' to play safe with str*() */
@@ -331,7 +331,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 22 unmodified lines
331 if (!p || p >= endp)331 if (!p || p >= endp)
332 break;332 break;
333 *p++ = '\0';333 *p++ = '\0';
334 av_dlog(s, "NSV NSVf INFO: %s='%s'\n", token, value);334 av_log(s, AV_LOG_TRACE, "NSV NSVf INFO: %s='%s'\n", token, value);
335 av_dict_set(&s->metadata, token, value, 0);335 av_dict_set(&s->metadata, token, value, 0);
336 }336 }
337 av_free(strings);337 av_free(strings);
@@ -339,7 +339,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 1 unmodified line
339 if (avio_feof(pb))339 if (avio_feof(pb))
340 return -1;340 return -1;
341 341
342 av_dlog(s, "NSV got infos; filepos %"PRId64"\n", avio_tell(pb));342 av_log(s, AV_LOG_TRACE, "NSV got infos; filepos %"PRId64"\n", avio_tell(pb));
343 343
344 if (table_entries_used > 0) {344 if (table_entries_used > 0) {
345 int i;345 int i;
@@ -364,7 +364,7 @@ static int nsv_parse_NSVf_header(AVFormatContext *s) · 18 unmodified lines
364 }364 }
365 }365 }
366 366
367 av_dlog(s, "NSV got index; filepos %"PRId64"\n", avio_tell(pb));367 av_log(s, AV_LOG_TRACE, "NSV got index; filepos %"PRId64"\n", avio_tell(pb));
368 368
369 avio_seek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */369 avio_seek(pb, nsv->base_offset + size, SEEK_SET); /* required for dumbdriving-271.nsv (2 extra bytes) */
370 370
@@ -384,7 +384,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) · 13 unmodified lines
384 int i;384 int i;
385 AVStream *st;385 AVStream *st;
386 NSVStream *nst;386 NSVStream *nst;
387 av_dlog(s, "%s()\n", __FUNCTION__);387 av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
388 388
389 vtag = avio_rl32(pb);389 vtag = avio_rl32(pb);
390 atag = avio_rl32(pb);390 atag = avio_rl32(pb);
@@ -392,7 +392,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) · 1 unmodified line
392 vheight = avio_rl16(pb);392 vheight = avio_rl16(pb);
393 i = avio_r8(pb);393 i = avio_r8(pb);
394 394
395 av_dlog(s, "NSV NSVs framerate code %2x\n", i);395 av_log(s, AV_LOG_TRACE, "NSV NSVs framerate code %2x\n", i);
396 if(i&0x80) { /* odd way of giving native framerates from docs */396 if(i&0x80) { /* odd way of giving native framerates from docs */
397 int t=(i & 0x7F)>>2;397 int t=(i & 0x7F)>>2;
398 if(t<16) framerate = (AVRational){1, t+1};398 if(t<16) framerate = (AVRational){1, t+1};
@@ -415,7 +415,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) · 16 unmodified lines
415 415
416 print_tag("NSV NSVs vtag", vtag, 0);416 print_tag("NSV NSVs vtag", vtag, 0);
417 print_tag("NSV NSVs atag", atag, 0);417 print_tag("NSV NSVs atag", atag, 0);
418 av_dlog(s, "NSV NSVs vsize %dx%d\n", vwidth, vheight);418 av_log(s, AV_LOG_TRACE, "NSV NSVs vsize %dx%d\n", vwidth, vheight);
419 419
420 /* XXX change to ap != NULL ? */420 /* XXX change to ap != NULL ? */
421 if (s->nb_streams == 0) { /* streams not yet published, let's do that */421 if (s->nb_streams == 0) { /* streams not yet published, let's do that */
@@ -478,7 +478,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s) · 56 unmodified lines
478 }478 }
479 } else {479 } else {
480 if (nsv->vtag != vtag || nsv->atag != atag || nsv->vwidth != vwidth || nsv->vheight != vwidth) {480 if (nsv->vtag != vtag || nsv->atag != atag || nsv->vwidth != vwidth || nsv->vheight != vwidth) {
481 av_dlog(s, "NSV NSVs header values differ from the first one!!!\n");481 av_log(s, AV_LOG_TRACE, "NSV NSVs header values differ from the first one!!!\n");
482 //return -1;482 //return -1;
483 }483 }
484 }484 }
@@ -496,8 +496,8 @@ static int nsv_read_header(AVFormatContext *s) · 11 unmodified lines
496 NSVContext *nsv = s->priv_data;496 NSVContext *nsv = s->priv_data;
497 int i, err;497 int i, err;
498 498
499 av_dlog(s, "%s()\n", __FUNCTION__);499 av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
500 av_dlog(s, "filename '%s'\n", s->filename);500 av_log(s, AV_LOG_TRACE, "filename '%s'\n", s->filename);
501 501
502 nsv->state = NSV_UNSYNC;502 nsv->state = NSV_UNSYNC;
503 nsv->ahead[0].data = nsv->ahead[1].data = NULL;503 nsv->ahead[0].data = nsv->ahead[1].data = NULL;
@@ -523,7 +523,7 @@ static int nsv_read_header(AVFormatContext *s) · 19 unmodified lines
523 /* now read the first chunk, so we can attempt to decode more info */523 /* now read the first chunk, so we can attempt to decode more info */
524 err = nsv_read_chunk(s, 1);524 err = nsv_read_chunk(s, 1);
525 525
526 av_dlog(s, "parsed header\n");526 av_log(s, AV_LOG_TRACE, "parsed header\n");
527 return err;527 return err;
528}528}
529 529
@@ -541,7 +541,7 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header) · 11 unmodified lines
541 uint16_t auxsize;541 uint16_t auxsize;
542 int ret;542 int ret;
543 543
544 av_dlog(s, "%s(%d)\n", __FUNCTION__, fill_header);544 av_log(s, AV_LOG_TRACE, "%s(%d)\n", __FUNCTION__, fill_header);
545 545
546 if (nsv->ahead[0].data || nsv->ahead[1].data)546 if (nsv->ahead[0].data || nsv->ahead[1].data)
547 return 0; //-1; /* hey! eat what you've in your plate first! */547 return 0; //-1; /* hey! eat what you've in your plate first! */
@@ -566,13 +566,13 @@ null_chunk_retry: · 18 unmodified lines
566 asize = avio_rl16(pb);566 asize = avio_rl16(pb);
567 vsize = (vsize << 4) | (auxcount >> 4);567 vsize = (vsize << 4) | (auxcount >> 4);
568 auxcount &= 0x0f;568 auxcount &= 0x0f;
569 av_dlog(s, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize);569 av_log(s, AV_LOG_TRACE, "NSV CHUNK %d aux, %u bytes video, %d bytes audio\n", auxcount, vsize, asize);
570 /* skip aux stuff */570 /* skip aux stuff */
571 for (i = 0; i < auxcount; i++) {571 for (i = 0; i < auxcount; i++) {
572 uint32_t av_unused auxtag;572 uint32_t av_unused auxtag;
573 auxsize = avio_rl16(pb);573 auxsize = avio_rl16(pb);
574 auxtag = avio_rl32(pb);574 auxtag = avio_rl32(pb);
575 av_dlog(s, "NSV aux data: '%c%c%c%c', %d bytes\n",575 av_log(s, AV_LOG_TRACE, "NSV aux data: '%c%c%c%c', %d bytes\n",
576 (auxtag & 0x0ff),576 (auxtag & 0x0ff),
577 ((auxtag >> 8) & 0x0ff),577 ((auxtag >> 8) & 0x0ff),
578 ((auxtag >> 16) & 0x0ff),578 ((auxtag >> 16) & 0x0ff),
@@ -604,7 +604,7 @@ null_chunk_retry: · 25 unmodified lines
604 pkt->dts = nst->frame_offset;604 pkt->dts = nst->frame_offset;
605 pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */605 pkt->flags |= nsv->state == NSV_HAS_READ_NSVS ? AV_PKT_FLAG_KEY : 0; /* keyframe only likely on a sync frame */
606 for (i = 0; i < FFMIN(8, vsize); i++)606 for (i = 0; i < FFMIN(8, vsize); i++)
607 av_dlog(s, "NSV video: [%d] = %02x\n", i, pkt->data[i]);607 av_log(s, AV_LOG_TRACE, "NSV video: [%d] = %02x\n", i, pkt->data[i]);
608 }608 }
609 if(st[NSV_ST_VIDEO])609 if(st[NSV_ST_VIDEO])
610 ((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset++;610 ((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset++;
@@ -624,11 +624,11 @@ null_chunk_retry: · 13 unmodified lines
624 if (!channels || !samplerate)624 if (!channels || !samplerate)
625 return AVERROR_INVALIDDATA;625 return AVERROR_INVALIDDATA;
626 asize-=4;626 asize-=4;
627 av_dlog(s, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);627 av_log(s, AV_LOG_TRACE, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
628 if (fill_header) {628 if (fill_header) {
629 st[NSV_ST_AUDIO]->need_parsing = AVSTREAM_PARSE_NONE; /* we know everything */629 st[NSV_ST_AUDIO]->need_parsing = AVSTREAM_PARSE_NONE; /* we know everything */
630 if (bps != 16) {630 if (bps != 16) {
631 av_dlog(s, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps);631 av_log(s, AV_LOG_TRACE, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps);
632 }632 }
633 bps /= channels; // ???633 bps /= channels; // ???
634 if (bps == 8)634 if (bps == 8)
@@ -637,7 +637,7 @@ null_chunk_retry: · 2 unmodified lines
637 channels = 1;637 channels = 1;
638 st[NSV_ST_AUDIO]->codec->channels = channels;638 st[NSV_ST_AUDIO]->codec->channels = channels;
639 st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;639 st[NSV_ST_AUDIO]->codec->sample_rate = samplerate;
640 av_dlog(s, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);640 av_log(s, AV_LOG_TRACE, "NSV RAWAUDIO: bps %d, nchan %d, srate %d\n", bps, channels, samplerate);
641 }641 }
642 }642 }
643 if ((ret = av_get_packet(pb, pkt, asize)) < 0)643 if ((ret = av_get_packet(pb, pkt, asize)) < 0)
@@ -649,7 +649,7 @@ null_chunk_retry: · 5 unmodified lines
649 pkt->dts = (((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset-1);649 pkt->dts = (((NSVStream*)st[NSV_ST_VIDEO]->priv_data)->frame_offset-1);
650 pkt->dts *= (int64_t)1000 * nsv->framerate.den;650 pkt->dts *= (int64_t)1000 * nsv->framerate.den;
651 pkt->dts += (int64_t)nsv->avsync * nsv->framerate.num;651 pkt->dts += (int64_t)nsv->avsync * nsv->framerate.num;
652 av_dlog(s, "NSV AUDIO: sync:%d, dts:%"PRId64, nsv->avsync, pkt->dts);652 av_log(s, AV_LOG_TRACE, "NSV AUDIO: sync:%d, dts:%"PRId64, nsv->avsync, pkt->dts);
653 }653 }
654 nst->frame_offset++;654 nst->frame_offset++;
655 }655 }
@@ -664,7 +664,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt) · 8 unmodified lines
664 NSVContext *nsv = s->priv_data;664 NSVContext *nsv = s->priv_data;
665 int i, err = 0;665 int i, err = 0;
666 666
667 av_dlog(s, "%s()\n", __FUNCTION__);667 av_log(s, AV_LOG_TRACE, "%s()\n", __FUNCTION__);
668 668
669 /* in case we don't already have something to eat ... */669 /* in case we don't already have something to eat ... */
670 if (!nsv->ahead[0].data && !nsv->ahead[1].data)670 if (!nsv->ahead[0].data && !nsv->ahead[1].data)
@@ -675,7 +675,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt) · 4 unmodified lines
675 /* now pick one of the plates */675 /* now pick one of the plates */
676 for (i = 0; i < 2; i++) {676 for (i = 0; i < 2; i++) {
677 if (nsv->ahead[i].data) {677 if (nsv->ahead[i].data) {
678 av_dlog(s, "%s: using cached packet[%d]\n", __FUNCTION__, i);678 av_log(s, AV_LOG_TRACE, "%s: using cached packet[%d]\n", __FUNCTION__, i);
679 /* avoid the cost of new_packet + memcpy(->data) */679 /* avoid the cost of new_packet + memcpy(->data) */
680 memcpy(pkt, &nsv->ahead[i], sizeof(AVPacket));680 memcpy(pkt, &nsv->ahead[i], sizeof(AVPacket));
681 nsv->ahead[i].data = NULL; /* we ate that one */681 nsv->ahead[i].data = NULL; /* we ate that one */
@@ -723,7 +723,7 @@ static int nsv_probe(AVProbeData *p) · 41 unmodified lines
723{723{
724 int i, score = 0;724 int i, score = 0;
725 725
726 av_dlog(NULL, "nsv_probe(), buf_size %d\n", p->buf_size);726 av_log(NULL, AV_LOG_TRACE, "nsv_probe(), buf_size %d\n", p->buf_size);
727 /* check file header */727 /* check file header */
728 /* streamed files might not have any header */728 /* streamed files might not have any header */
729 if (p->buf[0] == 'N' && p->buf[1] == 'S' &&729 if (p->buf[0] == 'N' && p->buf[1] == 'S' &&
libavformat/oggdec.c+3−3
@@ -455,7 +455,7 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize, · 454 unmodified lines
455 int complete = 0;455 int complete = 0;
456 int segp = 0, psize = 0;456 int segp = 0, psize = 0;
457 457
458 av_dlog(s, "ogg_packet: curidx=%i\n", ogg->curidx);458 av_log(s, AV_LOG_TRACE, "ogg_packet: curidx=%i\n", ogg->curidx);
459 if (sid)459 if (sid)
460 *sid = -1;460 *sid = -1;
461 461
@@ -470,7 +470,7 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize, · 8 unmodified lines
470 470
471 os = ogg->streams + idx;471 os = ogg->streams + idx;
472 472
473 av_dlog(s, "ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",473 av_log(s, AV_LOG_TRACE, "ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n",
474 idx, os->pstart, os->psize, os->segp, os->nsegs);474 idx, os->pstart, os->psize, os->segp, os->nsegs);
475 475
476 if (!os->codec) {476 if (!os->codec) {
@@ -685,7 +685,7 @@ static int ogg_read_header(AVFormatContext *s) · 208 unmodified lines
685 return ret;685 return ret;
686 }686 }
687 } while (!ogg->headers);687 } while (!ogg->headers);
688 av_dlog(s, "found headers\n");688 av_log(s, AV_LOG_TRACE, "found headers\n");
689 689
690 for (i = 0; i < ogg->nstreams; i++) {690 for (i = 0; i < ogg->nstreams; i++) {
691 struct ogg_stream *os = ogg->streams + i;691 struct ogg_stream *os = ogg->streams + i;
libavformat/r3d.c+30−30
@@ -44,7 +44,7 @@ static int read_atom(AVFormatContext *s, Atom *atom) · 43 unmodified lines
44 if (atom->size < 8)44 if (atom->size < 8)
45 return -1;45 return -1;
46 atom->tag = avio_rl32(s->pb);46 atom->tag = avio_rl32(s->pb);
47 av_dlog(s, "atom %u %.4s offset %#"PRIx64"\n",47 av_log(s, AV_LOG_TRACE, "atom %u %.4s offset %#"PRIx64"\n",
48 atom->size, (char*)&atom->tag, atom->offset);48 atom->size, (char*)&atom->tag, atom->offset);
49 return atom->size;49 return atom->size;
50}50}
@@ -64,16 +64,16 @@ static int r3d_read_red1(AVFormatContext *s) · 13 unmodified lines
64 64
65 tmp = avio_r8(s->pb); // major version65 tmp = avio_r8(s->pb); // major version
66 tmp2 = avio_r8(s->pb); // minor version66 tmp2 = avio_r8(s->pb); // minor version
67 av_dlog(s, "version %d.%d\n", tmp, tmp2);67 av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
68 68
69 tmp = avio_rb16(s->pb); // unknown69 tmp = avio_rb16(s->pb); // unknown
70 av_dlog(s, "unknown1 %d\n", tmp);70 av_log(s, AV_LOG_TRACE, "unknown1 %d\n", tmp);
71 71
72 tmp = avio_rb32(s->pb);72 tmp = avio_rb32(s->pb);
73 avpriv_set_pts_info(st, 32, 1, tmp);73 avpriv_set_pts_info(st, 32, 1, tmp);
74 74
75 tmp = avio_rb32(s->pb); // filenum75 tmp = avio_rb32(s->pb); // filenum
76 av_dlog(s, "filenum %d\n", tmp);76 av_log(s, AV_LOG_TRACE, "filenum %d\n", tmp);
77 77
78 avio_skip(s->pb, 32); // unknown78 avio_skip(s->pb, 32); // unknown
79 79
@@ -81,7 +81,7 @@ static int r3d_read_red1(AVFormatContext *s) · 1 unmodified line
81 st->codec->height = avio_rb32(s->pb);81 st->codec->height = avio_rb32(s->pb);
82 82
83 tmp = avio_rb16(s->pb); // unknown83 tmp = avio_rb16(s->pb); // unknown
84 av_dlog(s, "unknown2 %d\n", tmp);84 av_log(s, AV_LOG_TRACE, "unknown2 %d\n", tmp);
85 85
86 framerate.num = avio_rb16(s->pb);86 framerate.num = avio_rb16(s->pb);
87 framerate.den = avio_rb16(s->pb);87 framerate.den = avio_rb16(s->pb);
@@ -93,7 +93,7 @@ static int r3d_read_red1(AVFormatContext *s) · 5 unmodified lines
93 }93 }
94 94
95 tmp = avio_r8(s->pb); // audio channels95 tmp = avio_r8(s->pb); // audio channels
96 av_dlog(s, "audio channels %d\n", tmp);96 av_log(s, AV_LOG_TRACE, "audio channels %d\n", tmp);
97 if (tmp > 0) {97 if (tmp > 0) {
98 AVStream *ast = avformat_new_stream(s, NULL);98 AVStream *ast = avformat_new_stream(s, NULL);
99 if (!ast)99 if (!ast)
@@ -108,10 +108,10 @@ static int r3d_read_red1(AVFormatContext *s) · 8 unmodified lines
108 filename[sizeof(filename)-1] = 0;108 filename[sizeof(filename)-1] = 0;
109 av_dict_set(&st->metadata, "filename", filename, 0);109 av_dict_set(&st->metadata, "filename", filename, 0);
110 110
111 av_dlog(s, "filename %s\n", filename);111 av_log(s, AV_LOG_TRACE, "filename %s\n", filename);
112 av_dlog(s, "resolution %dx%d\n", st->codec->width, st->codec->height);112 av_log(s, AV_LOG_TRACE, "resolution %dx%d\n", st->codec->width, st->codec->height);
113 av_dlog(s, "timescale %d\n", st->time_base.den);113 av_log(s, AV_LOG_TRACE, "timescale %d\n", st->time_base.den);
114 av_dlog(s, "frame rate %d/%d\n",114 av_log(s, AV_LOG_TRACE, "frame rate %d/%d\n",
115 framerate.num, framerate.den);115 framerate.num, framerate.den);
116 116
117 return 0;117 return 0;
@@ -134,14 +134,14 @@ static int r3d_read_rdvo(AVFormatContext *s, Atom *atom) · 16 unmodified lines
134 r3d->video_offsets_count = i;134 r3d->video_offsets_count = i;
135 break;135 break;
136 }136 }
137 av_dlog(s, "video offset %d: %#x\n", i, r3d->video_offsets[i]);137 av_log(s, AV_LOG_TRACE, "video offset %d: %#x\n", i, r3d->video_offsets[i]);
138 }138 }
139 139
140 if (st->avg_frame_rate.num)140 if (st->avg_frame_rate.num)
141 st->duration = av_rescale_q(r3d->video_offsets_count,141 st->duration = av_rescale_q(r3d->video_offsets_count,
142 av_inv_q(st->avg_frame_rate),142 av_inv_q(st->avg_frame_rate),
143 st->time_base);143 st->time_base);
144 av_dlog(s, "duration %"PRId64"\n", st->duration);144 av_log(s, AV_LOG_TRACE, "duration %"PRId64"\n", st->duration);
145 145
146 return 0;146 return 0;
147}147}
@@ -157,10 +157,10 @@ static void r3d_read_reos(AVFormatContext *s) · 9 unmodified lines
157 avio_rb32(s->pb); // rdas offset157 avio_rb32(s->pb); // rdas offset
158 158
159 tmp = avio_rb32(s->pb);159 tmp = avio_rb32(s->pb);
160 av_dlog(s, "num video chunks %d\n", tmp);160 av_log(s, AV_LOG_TRACE, "num video chunks %d\n", tmp);
161 161
162 tmp = avio_rb32(s->pb);162 tmp = avio_rb32(s->pb);
163 av_dlog(s, "num audio chunks %d\n", tmp);163 av_log(s, AV_LOG_TRACE, "num audio chunks %d\n", tmp);
164 164
165 avio_skip(s->pb, 6*4);165 avio_skip(s->pb, 6*4);
166}166}
@@ -186,7 +186,7 @@ static int r3d_read_header(AVFormatContext *s) · 19 unmodified lines
186 }186 }
187 187
188 s->internal->data_offset = avio_tell(s->pb);188 s->internal->data_offset = avio_tell(s->pb);
189 av_dlog(s, "data offset %#"PRIx64"\n", s->internal->data_offset);189 av_log(s, AV_LOG_TRACE, "data offset %#"PRIx64"\n", s->internal->data_offset);
190 if (!s->pb->seekable)190 if (!s->pb->seekable)
191 return 0;191 return 0;
192 // find REOB/REOF/REOS to load index192 // find REOB/REOF/REOS to load index
@@ -228,29 +228,29 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 35 unmodified lines
228 dts = avio_rb32(s->pb);228 dts = avio_rb32(s->pb);
229 229
230 tmp = avio_rb32(s->pb);230 tmp = avio_rb32(s->pb);
231 av_dlog(s, "frame num %d\n", tmp);231 av_log(s, AV_LOG_TRACE, "frame num %d\n", tmp);
232 232
233 tmp = avio_r8(s->pb); // major version233 tmp = avio_r8(s->pb); // major version
234 tmp2 = avio_r8(s->pb); // minor version234 tmp2 = avio_r8(s->pb); // minor version
235 av_dlog(s, "version %d.%d\n", tmp, tmp2);235 av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
236 236
237 tmp = avio_rb16(s->pb); // unknown237 tmp = avio_rb16(s->pb); // unknown
238 av_dlog(s, "unknown %d\n", tmp);238 av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
239 239
240 if (tmp > 4) {240 if (tmp > 4) {
241 tmp = avio_rb16(s->pb); // unknown241 tmp = avio_rb16(s->pb); // unknown
242 av_dlog(s, "unknown %d\n", tmp);242 av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
243 243
244 tmp = avio_rb16(s->pb); // unknown244 tmp = avio_rb16(s->pb); // unknown
245 av_dlog(s, "unknown %d\n", tmp);245 av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
246 246
247 tmp = avio_rb32(s->pb);247 tmp = avio_rb32(s->pb);
248 av_dlog(s, "width %d\n", tmp);248 av_log(s, AV_LOG_TRACE, "width %d\n", tmp);
249 tmp = avio_rb32(s->pb);249 tmp = avio_rb32(s->pb);
250 av_dlog(s, "height %d\n", tmp);250 av_log(s, AV_LOG_TRACE, "height %d\n", tmp);
251 251
252 tmp = avio_rb32(s->pb);252 tmp = avio_rb32(s->pb);
253 av_dlog(s, "metadata len %d\n", tmp);253 av_log(s, AV_LOG_TRACE, "metadata len %d\n", tmp);
254 }254 }
255 tmp = atom->size - 8 - (avio_tell(s->pb) - pos);255 tmp = atom->size - 8 - (avio_tell(s->pb) - pos);
256 if (tmp < 0)256 if (tmp < 0)
@@ -266,7 +266,7 @@ static int r3d_read_redv(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 9 unmodified lines
266 if (st->avg_frame_rate.num)266 if (st->avg_frame_rate.num)
267 pkt->duration = (uint64_t)st->time_base.den*267 pkt->duration = (uint64_t)st->time_base.den*
268 st->avg_frame_rate.den/st->avg_frame_rate.num;268 st->avg_frame_rate.den/st->avg_frame_rate.num;
269 av_dlog(s, "pkt dts %"PRId64" duration %d\n", pkt->dts, pkt->duration);269 av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %d\n", pkt->dts, pkt->duration);
270 270
271 return 0;271 return 0;
272}272}
@@ -291,17 +291,17 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 18 unmodified lines
291 samples = avio_rb32(s->pb);291 samples = avio_rb32(s->pb);
292 292
293 tmp = avio_rb32(s->pb);293 tmp = avio_rb32(s->pb);
294 av_dlog(s, "packet num %d\n", tmp);294 av_log(s, AV_LOG_TRACE, "packet num %d\n", tmp);
295 295
296 tmp = avio_rb16(s->pb); // unknown296 tmp = avio_rb16(s->pb); // unknown
297 av_dlog(s, "unknown %d\n", tmp);297 av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
298 298
299 tmp = avio_r8(s->pb); // major version299 tmp = avio_r8(s->pb); // major version
300 tmp2 = avio_r8(s->pb); // minor version300 tmp2 = avio_r8(s->pb); // minor version
301 av_dlog(s, "version %d.%d\n", tmp, tmp2);301 av_log(s, AV_LOG_TRACE, "version %d.%d\n", tmp, tmp2);
302 302
303 tmp = avio_rb32(s->pb); // unknown303 tmp = avio_rb32(s->pb); // unknown
304 av_dlog(s, "unknown %d\n", tmp);304 av_log(s, AV_LOG_TRACE, "unknown %d\n", tmp);
305 305
306 size = atom->size - 8 - (avio_tell(s->pb) - pos);306 size = atom->size - 8 - (avio_tell(s->pb) - pos);
307 if (size < 0)307 if (size < 0)
@@ -316,7 +316,7 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom) · 8 unmodified lines
316 pkt->dts = dts;316 pkt->dts = dts;
317 if (st->codec->sample_rate)317 if (st->codec->sample_rate)
318 pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);318 pkt->duration = av_rescale(samples, st->time_base.den, st->codec->sample_rate);
319 av_dlog(s, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",319 av_log(s, AV_LOG_TRACE, "pkt dts %"PRId64" duration %d samples %d sample rate %d\n",
320 pkt->dts, pkt->duration, samples, st->codec->sample_rate);320 pkt->dts, pkt->duration, samples, st->codec->sample_rate);
321 321
322 return 0;322 return 0;
@@ -373,7 +373,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i · 50 unmodified lines
373 373
374 frame_num = av_rescale_q(sample_time, st->time_base,374 frame_num = av_rescale_q(sample_time, st->time_base,
375 av_inv_q(st->avg_frame_rate));375 av_inv_q(st->avg_frame_rate));
376 av_dlog(s, "seek frame num %d timestamp %"PRId64"\n",376 av_log(s, AV_LOG_TRACE, "seek frame num %d timestamp %"PRId64"\n",
377 frame_num, sample_time);377 frame_num, sample_time);
378 378
379 if (frame_num < r3d->video_offsets_count) {379 if (frame_num < r3d->video_offsets_count) {
libavformat/rmdec.c+3−3
@@ -391,7 +391,7 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, · 390 unmodified lines
391 st->codec->codec_tag = avio_rl32(pb);391 st->codec->codec_tag = avio_rl32(pb);
392 st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,392 st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,
393 st->codec->codec_tag);393 st->codec->codec_tag);
394 av_dlog(s, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));394 av_log(s, AV_LOG_TRACE, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));
395 if (st->codec->codec_id == AV_CODEC_ID_NONE)395 if (st->codec->codec_id == AV_CODEC_ID_NONE)
396 goto fail1;396 goto fail1;
397 st->codec->width = avio_rb16(pb);397 st->codec->width = avio_rb16(pb);
@@ -532,7 +532,7 @@ static int rm_read_header(AVFormatContext *s) · 134 unmodified lines
532 tag = avio_rl32(pb);532 tag = avio_rl32(pb);
533 tag_size = avio_rb32(pb);533 tag_size = avio_rb32(pb);
534 avio_rb16(pb);534 avio_rb16(pb);
535 av_dlog(s, "tag=%c%c%c%c (%08x) size=%d\n",535 av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c (%08x) size=%d\n",
536 (tag ) & 0xff,536 (tag ) & 0xff,
537 (tag >> 8) & 0xff,537 (tag >> 8) & 0xff,
538 (tag >> 16) & 0xff,538 (tag >> 16) & 0xff,
@@ -1079,7 +1079,7 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index, · 540 unmodified lines
1079 }1079 }
1080 1080
1081 if((flags&2) && (seq&0x7F) == 1){1081 if((flags&2) && (seq&0x7F) == 1){
1082 av_dlog(s, "%d %d-%d %"PRId64" %d\n",1082 av_log(s, AV_LOG_TRACE, "%d %d-%d %"PRId64" %d\n",
1083 flags, stream_index2, stream_index, dts, seq);1083 flags, stream_index2, stream_index, dts, seq);
1084 av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME);1084 av_add_index_entry(st, pos, dts, 0, 0, AVINDEX_KEYFRAME);
1085 if(stream_index2 == stream_index)1085 if(stream_index2 == stream_index)
libavformat/rtmpproto.c+1−1
@@ -2315,7 +2315,7 @@ static int rtmp_parse_result(URLContext *s, RTMPContext *rt, RTMPPacket *pkt) · 2314 unmodified lines
2315 2315
2316 switch (pkt->type) {2316 switch (pkt->type) {
2317 case RTMP_PT_BYTES_READ:2317 case RTMP_PT_BYTES_READ:
2318 av_dlog(s, "received bytes read report\n");2318 av_log(s, AV_LOG_TRACE, "received bytes read report\n");
2319 break;2319 break;
2320 case RTMP_PT_CHUNK_SIZE:2320 case RTMP_PT_CHUNK_SIZE:
2321 if ((ret = handle_chunk_size(s, pkt)) < 0)2321 if ((ret = handle_chunk_size(s, pkt)) < 0)
libavformat/rtpdec.c+2−2
@@ -362,9 +362,9 @@ int ff_rtp_check_and_send_back_rr(RTPDemuxContext *s, URLContext *fd, · 361 unmodified lines
362 len = avio_close_dyn_buf(pb, &buf);362 len = avio_close_dyn_buf(pb, &buf);
363 if ((len > 0) && buf) {363 if ((len > 0) && buf) {
364 int av_unused result;364 int av_unused result;
365 av_dlog(s->ic, "sending %d bytes of RR\n", len);365 av_log(s->ic, AV_LOG_TRACE, "sending %d bytes of RR\n", len);
366 result = ffurl_write(fd, buf, len);366 result = ffurl_write(fd, buf, len);
367 av_dlog(s->ic, "result from ffurl_write: %d\n", result);367 av_log(s->ic, AV_LOG_TRACE, "result from ffurl_write: %d\n", result);
368 av_free(buf);368 av_free(buf);
369 }369 }
370 return 0;370 return 0;
libavformat/rtpdec_hevc.c+4−4
@@ -55,7 +55,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, · 54 unmodified lines
55 /* profile-id: 0-31 */55 /* profile-id: 0-31 */
56 if (!strcmp(attr, "profile-id")) {56 if (!strcmp(attr, "profile-id")) {
57 hevc_data->profile_id = atoi(value);57 hevc_data->profile_id = atoi(value);
58 av_dlog(s, "SDP: found profile-id: %d\n", hevc_data->profile_id);58 av_log(s, AV_LOG_TRACE, "SDP: found profile-id: %d\n", hevc_data->profile_id);
59 }59 }
60 60
61 /* tier-flag: 0-1 */61 /* tier-flag: 0-1 */
@@ -106,7 +106,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, · 44 unmodified lines
106 if (!strcmp(attr, "sprop-max-don-diff")) {106 if (!strcmp(attr, "sprop-max-don-diff")) {
107 if (atoi(value) > 0)107 if (atoi(value) > 0)
108 hevc_data->using_donl_field = 1;108 hevc_data->using_donl_field = 1;
109 av_dlog(s, "Found sprop-max-don-diff in SDP, DON field usage is: %d\n",109 av_log(s, AV_LOG_TRACE, "Found sprop-max-don-diff in SDP, DON field usage is: %d\n",
110 hevc_data->using_donl_field);110 hevc_data->using_donl_field);
111 }111 }
112 112
@@ -114,7 +114,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, · 1 unmodified line
114 if (!strcmp(attr, "sprop-depack-buf-nalus")) {114 if (!strcmp(attr, "sprop-depack-buf-nalus")) {
115 if (atoi(value) > 0)115 if (atoi(value) > 0)
116 hevc_data->using_donl_field = 1;116 hevc_data->using_donl_field = 1;
117 av_dlog(s, "Found sprop-depack-buf-nalus in SDP, DON field usage is: %d\n",117 av_log(s, AV_LOG_TRACE, "Found sprop-depack-buf-nalus in SDP, DON field usage is: %d\n",
118 hevc_data->using_donl_field);118 hevc_data->using_donl_field);
119 }119 }
120 120
@@ -309,7 +309,7 @@ static int hevc_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_hevc_ctx · 188 unmodified lines
309 len -= RTP_HEVC_DONL_FIELD_SIZE;309 len -= RTP_HEVC_DONL_FIELD_SIZE;
310 }310 }
311 311
312 av_dlog(ctx, " FU type %d with %d bytes\n", fu_type, len);312 av_log(ctx, AV_LOG_TRACE, " FU type %d with %d bytes\n", fu_type, len);
313 313
314 /* sanity check for size of input packet: 1 byte payload at least */314 /* sanity check for size of input packet: 1 byte payload at least */
315 if (len <= 0) {315 if (len <= 0) {
libavformat/rtpenc.c+3−3
@@ -262,7 +262,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time, int bye) · 261 unmodified lines
262 RTPMuxContext *s = s1->priv_data;262 RTPMuxContext *s = s1->priv_data;
263 uint32_t rtp_ts;263 uint32_t rtp_ts;
264 264
265 av_dlog(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);265 av_log(s1, AV_LOG_TRACE, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp);
266 266
267 s->last_rtcp_ntp_time = ntp_time;267 s->last_rtcp_ntp_time = ntp_time;
268 rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000},268 rtp_ts = av_rescale_q(ntp_time - s->first_rtcp_ntp_time, (AVRational){1, 1000000},
@@ -307,7 +307,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m) · 38 unmodified lines
307{307{
308 RTPMuxContext *s = s1->priv_data;308 RTPMuxContext *s = s1->priv_data;
309 309
310 av_dlog(s1, "rtp_send_data size=%d\n", len);310 av_log(s1, AV_LOG_TRACE, "rtp_send_data size=%d\n", len);
311 311
312 /* build the RTP header */312 /* build the RTP header */
313 avio_w8(s1->pb, RTP_VERSION << 6);313 avio_w8(s1->pb, RTP_VERSION << 6);
@@ -495,7 +495,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) · 181 unmodified lines
495 int rtcp_bytes;495 int rtcp_bytes;
496 int size= pkt->size;496 int size= pkt->size;
497 497
498 av_dlog(s1, "%d: write len=%d\n", pkt->stream_index, size);498 av_log(s1, AV_LOG_TRACE, "%d: write len=%d\n", pkt->stream_index, size);
499 499
500 rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /500 rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) /
501 RTCP_TX_RATIO_DEN;501 RTCP_TX_RATIO_DEN;
libavformat/rtsp.c+5−5
@@ -385,7 +385,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1, · 384 unmodified lines
385 struct sockaddr_storage sdp_ip;385 struct sockaddr_storage sdp_ip;
386 int ttl;386 int ttl;
387 387
388 av_dlog(s, "sdp: %c='%s'\n", letter, buf);388 av_log(s, AV_LOG_TRACE, "sdp: %c='%s'\n", letter, buf);
389 389
390 p = buf;390 p = buf;
391 if (s1->skip_media && letter != 'm')391 if (s1->skip_media && letter != 'm')
@@ -1113,7 +1113,7 @@ void ff_rtsp_skip_packet(AVFormatContext *s) · 721 unmodified lines
1113 return;1113 return;
1114 len = AV_RB16(buf + 1);1114 len = AV_RB16(buf + 1);
1115 1115
1116 av_dlog(s, "skipping RTP packet len=%d\n", len);1116 av_log(s, AV_LOG_TRACE, "skipping RTP packet len=%d\n", len);
1117 1117
1118 /* skip payload */1118 /* skip payload */
1119 while (len > 0) {1119 while (len > 0) {
@@ -1150,7 +1150,7 @@ start: · 30 unmodified lines
1150 q = buf;1150 q = buf;
1151 for (;;) {1151 for (;;) {
1152 ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);1152 ret = ffurl_read_complete(rt->rtsp_hd, &ch, 1);
1153 av_dlog(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);1153 av_log(s, AV_LOG_TRACE, "ret=%d c=%02x [%c]\n", ret, ch, ch);
1154 if (ret != 1)1154 if (ret != 1)
1155 return AVERROR_EOF;1155 return AVERROR_EOF;
1156 if (ch == '\n')1156 if (ch == '\n')
@@ -1168,7 +1168,7 @@ start: · 11 unmodified lines
1168 }1168 }
1169 *q = '\0';1169 *q = '\0';
1170 1170
1171 av_dlog(s, "line='%s'\n", buf);1171 av_log(s, AV_LOG_TRACE, "line='%s'\n", buf);
1172 1172
1173 /* test if last line */1173 /* test if last line */
1174 if (buf[0] == '\0')1174 if (buf[0] == '\0')
@@ -1320,7 +1320,7 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s, · 145 unmodified lines
1320 out_buf = base64buf;1320 out_buf = base64buf;
1321 }1321 }
1322 1322
1323 av_dlog(s, "Sending:\n%s--\n", buf);1323 av_log(s, AV_LOG_TRACE, "Sending:\n%s--\n", buf);
1324 1324
1325 ffurl_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));1325 ffurl_write(rt->rtsp_hd_out, out_buf, strlen(out_buf));
1326 if (send_content_length > 0 && send_content) {1326 if (send_content_length > 0 && send_content) {
libavformat/rtspdec.c+6−6
@@ -113,7 +113,7 @@ static int rtsp_send_reply(AVFormatContext *s, enum RTSPStatusCode code, · 112 unmodified lines
113 if (extracontent)113 if (extracontent)
114 av_strlcat(message, extracontent, sizeof(message));114 av_strlcat(message, extracontent, sizeof(message));
115 av_strlcat(message, "\r\n", sizeof(message));115 av_strlcat(message, "\r\n", sizeof(message));
116 av_dlog(s, "Sending response:\n%s", message);116 av_log(s, AV_LOG_TRACE, "Sending response:\n%s", message);
117 ffurl_write(rt->rtsp_hd_out, message, strlen(message));117 ffurl_write(rt->rtsp_hd_out, message, strlen(message));
118 118
119 return 0;119 return 0;
@@ -149,7 +149,7 @@ static inline int rtsp_read_request(AVFormatContext *s, · 29 unmodified lines
149 if (ret)149 if (ret)
150 return ret;150 return ret;
151 if (rbuflen > 1) {151 if (rbuflen > 1) {
152 av_dlog(s, "Parsing[%d]: %s\n", rbuflen, rbuf);152 av_log(s, AV_LOG_TRACE, "Parsing[%d]: %s\n", rbuflen, rbuf);
153 ff_rtsp_parse_line(request, rbuf, rt, method);153 ff_rtsp_parse_line(request, rbuf, rt, method);
154 }154 }
155 } while (rbuflen > 0);155 } while (rbuflen > 0);
@@ -292,7 +292,7 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl) · 136 unmodified lines
292 snprintf(buf, sizeof(buf), "%d", rt->buffer_size);292 snprintf(buf, sizeof(buf), "%d", rt->buffer_size);
293 av_dict_set(&opts, "buffer_size", buf, 0);293 av_dict_set(&opts, "buffer_size", buf, 0);
294 ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL);294 ff_url_join(url, sizeof(url), "rtp", NULL, host, localport, NULL);
295 av_dlog(s, "Opening: %s", url);295 av_log(s, AV_LOG_TRACE, "Opening: %s", url);
296 ret = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,296 ret = ffurl_open(&rtsp_st->rtp_handle, url, AVIO_FLAG_READ_WRITE,
297 &s->interrupt_callback, &opts);297 &s->interrupt_callback, &opts);
298 av_dict_free(&opts);298 av_dict_free(&opts);
@@ -304,7 +304,7 @@ static int rtsp_read_setup(AVFormatContext *s, char* host, char *controlurl) · 5 unmodified lines
304 return ret;304 return ret;
305 }305 }
306 306
307 av_dlog(s, "Listening on: %d",307 av_log(s, AV_LOG_TRACE, "Listening on: %d",
308 ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle));308 ff_rtp_get_local_rtp_port(rtsp_st->rtp_handle));
309 if ((ret = ff_rtsp_open_transport_ctx(s, rtsp_st))) {309 if ((ret = ff_rtsp_open_transport_ctx(s, rtsp_st))) {
310 rtsp_send_reply(s, RTSP_STATUS_TRANSPORT, NULL, request.seq);310 rtsp_send_reply(s, RTSP_STATUS_TRANSPORT, NULL, request.seq);
@@ -753,7 +753,7 @@ int ff_rtsp_tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st, · 442 unmodified lines
753 int id, len, i, ret;753 int id, len, i, ret;
754 RTSPStream *rtsp_st;754 RTSPStream *rtsp_st;
755 755
756 av_dlog(s, "tcp_read_packet:\n");756 av_log(s, AV_LOG_TRACE, "tcp_read_packet:\n");
757redo:757redo:
758 for (;;) {758 for (;;) {
759 RTSPMessageHeader reply;759 RTSPMessageHeader reply;
@@ -772,7 +772,7 @@ redo: · 12 unmodified lines
772 return -1;772 return -1;
773 id = buf[0];773 id = buf[0];
774 len = AV_RB16(buf + 1);774 len = AV_RB16(buf + 1);
775 av_dlog(s, "id=%d len=%d\n", id, len);775 av_log(s, AV_LOG_TRACE, "id=%d len=%d\n", id, len);
776 if (len > buf_size || len < 8)776 if (len > buf_size || len < 8)
777 goto redo;777 goto redo;
778 /* get the data */778 /* get the data */
libavformat/utils.c+12−12
@@ -1085,7 +1085,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 1084 unmodified lines
1085 pkt->pts > pkt->dts)1085 pkt->pts > pkt->dts)
1086 presentation_delayed = 1;1086 presentation_delayed = 1;
1087 1087
1088 av_dlog(NULL,1088 av_log(NULL, AV_LOG_TRACE,
1089 "IN delayed:%d pts:%s, dts:%s cur_dts:%s st:%d pc:%p duration:%d delay:%d onein_oneout:%d\n",1089 "IN delayed:%d pts:%s, dts:%s cur_dts:%s st:%d pc:%p duration:%d delay:%d onein_oneout:%d\n",
1090 presentation_delayed, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts),1090 presentation_delayed, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts),
1091 pkt->stream_index, pc, pkt->duration, delay, onein_oneout);1091 pkt->stream_index, pc, pkt->duration, delay, onein_oneout);
@@ -1151,7 +1151,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, · 59 unmodified lines
1151 if (pkt->dts > st->cur_dts)1151 if (pkt->dts > st->cur_dts)
1152 st->cur_dts = pkt->dts;1152 st->cur_dts = pkt->dts;
1153 1153
1154 av_dlog(NULL, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",1154 av_log(NULL, AV_LOG_TRACE, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
1155 presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));1155 presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts));
1156 1156
1157 /* update flags */1157 /* update flags */
@@ -1798,7 +1798,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, · 640 unmodified lines
1798 if (stream_index < 0)1798 if (stream_index < 0)
1799 return -1;1799 return -1;
1800 1800
1801 av_dlog(s, "read_seek: %d %s\n", stream_index, av_ts2str(target_ts));1801 av_log(s, AV_LOG_TRACE, "read_seek: %d %s\n", stream_index, av_ts2str(target_ts));
1802 1802
1803 ts_max =1803 ts_max =
1804 ts_min = AV_NOPTS_VALUE;1804 ts_min = AV_NOPTS_VALUE;
@@ -1818,7 +1818,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, · 13 unmodified lines
1818 if (e->timestamp <= target_ts || e->pos == e->min_distance) {1818 if (e->timestamp <= target_ts || e->pos == e->min_distance) {
1819 pos_min = e->pos;1819 pos_min = e->pos;
1820 ts_min = e->timestamp;1820 ts_min = e->timestamp;
1821 av_dlog(s, "using cached pos_min=0x%"PRIx64" dts_min=%s\n",1821 av_log(s, AV_LOG_TRACE, "using cached pos_min=0x%"PRIx64" dts_min=%s\n",
1822 pos_min, av_ts2str(ts_min));1822 pos_min, av_ts2str(ts_min));
1823 } else {1823 } else {
1824 av_assert1(index == 0);1824 av_assert1(index == 0);
@@ -1833,7 +1833,7 @@ int ff_seek_frame_binary(AVFormatContext *s, int stream_index, · 8 unmodified lines
1833 pos_max = e->pos;1833 pos_max = e->pos;
1834 ts_max = e->timestamp;1834 ts_max = e->timestamp;
1835 pos_limit = pos_max - e->min_distance;1835 pos_limit = pos_max - e->min_distance;
1836 av_dlog(s, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx641836 av_log(s, AV_LOG_TRACE, "using cached pos_max=0x%"PRIx64" pos_limit=0x%"PRIx64
1837 " dts_max=%s\n", pos_max, pos_limit, av_ts2str(ts_max));1837 " dts_max=%s\n", pos_max, pos_limit, av_ts2str(ts_max));
1838 }1838 }
1839 }1839 }
@@ -1903,7 +1903,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, · 63 unmodified lines
1903 int no_change;1903 int no_change;
1904 int ret;1904 int ret;
1905 1905
1906 av_dlog(s, "gen_seek: %d %s\n", stream_index, av_ts2str(target_ts));1906 av_log(s, AV_LOG_TRACE, "gen_seek: %d %s\n", stream_index, av_ts2str(target_ts));
1907 1907
1908 if (ts_min == AV_NOPTS_VALUE) {1908 if (ts_min == AV_NOPTS_VALUE) {
1909 pos_min = s->internal->data_offset;1909 pos_min = s->internal->data_offset;
@@ -1932,7 +1932,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, · 22 unmodified lines
1932 1932
1933 no_change = 0;1933 no_change = 0;
1934 while (pos_min < pos_limit) {1934 while (pos_min < pos_limit) {
1935 av_dlog(s,1935 av_log(s, AV_LOG_TRACE,
1936 "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%s dts_max=%s\n",1936 "pos_min=0x%"PRIx64" pos_max=0x%"PRIx64" dts_min=%s dts_max=%s\n",
1937 pos_min, pos_max, av_ts2str(ts_min), av_ts2str(ts_max));1937 pos_min, pos_max, av_ts2str(ts_min), av_ts2str(ts_max));
1938 av_assert0(pos_limit <= pos_max);1938 av_assert0(pos_limit <= pos_max);
@@ -1963,7 +1963,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, · 24 unmodified lines
1963 no_change++;1963 no_change++;
1964 else1964 else
1965 no_change = 0;1965 no_change = 0;
1966 av_dlog(s, "%"PRId64" %"PRId64" %"PRId64" / %s %s %s"1966 av_log(s, AV_LOG_TRACE, "%"PRId64" %"PRId64" %"PRId64" / %s %s %s"
1967 " target:%s limit:%"PRId64" start:%"PRId64" noc:%d\n",1967 " target:%s limit:%"PRId64" start:%"PRId64" noc:%d\n",
1968 pos_min, pos, pos_max,1968 pos_min, pos, pos_max,
1969 av_ts2str(ts_min), av_ts2str(ts), av_ts2str(ts_max), av_ts2str(target_ts),1969 av_ts2str(ts_min), av_ts2str(ts), av_ts2str(ts_max), av_ts2str(target_ts),
@@ -1990,7 +1990,7 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index, int64_t target_ts, · 20 unmodified lines
1990 ts_min = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);1990 ts_min = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
1991 pos_min++;1991 pos_min++;
1992 ts_max = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);1992 ts_max = ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
1993 av_dlog(s, "pos=0x%"PRIx64" %s<=%s<=%s\n",1993 av_log(s, AV_LOG_TRACE, "pos=0x%"PRIx64" %s<=%s<=%s\n",
1994 pos, av_ts2str(ts_min), av_ts2str(target_ts), av_ts2str(ts_max));1994 pos, av_ts2str(ts_min), av_ts2str(target_ts), av_ts2str(ts_max));
1995#endif1995#endif
1996 *ts_ret = ts;1996 *ts_ret = ts;
@@ -2544,11 +2544,11 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) · 547 unmodified lines
2544 AVStream av_unused *st;2544 AVStream av_unused *st;
2545 for (i = 0; i < ic->nb_streams; i++) {2545 for (i = 0; i < ic->nb_streams; i++) {
2546 st = ic->streams[i];2546 st = ic->streams[i];
2547 av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i,2547 av_log(ic, AV_LOG_TRACE, "%d: start_time: %0.3f duration: %0.3f\n", i,
2548 (double) st->start_time / AV_TIME_BASE,2548 (double) st->start_time / AV_TIME_BASE,
2549 (double) st->duration / AV_TIME_BASE);2549 (double) st->duration / AV_TIME_BASE);
2550 }2550 }
2551 av_dlog(ic,2551 av_log(ic, AV_LOG_TRACE,
2552 "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",2552 "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n",
2553 (double) ic->start_time / AV_TIME_BASE,2553 (double) ic->start_time / AV_TIME_BASE,
2554 (double) ic->duration / AV_TIME_BASE,2554 (double) ic->duration / AV_TIME_BASE,
@@ -3731,7 +3731,7 @@ AVProgram *av_new_program(AVFormatContext *ac, int id) · 1176 unmodified lines
3731 AVProgram *program = NULL;3731 AVProgram *program = NULL;
3732 int i;3732 int i;
3733 3733
3734 av_dlog(ac, "new_program: id=0x%04x\n", id);3734 av_log(ac, AV_LOG_TRACE, "new_program: id=0x%04x\n", id);
3735 3735
3736 for (i = 0; i < ac->nb_programs; i++)3736 for (i = 0; i < ac->nb_programs; i++)
3737 if (ac->programs[i]->id == id)3737 if (ac->programs[i]->id == id)
libavresample/audio_convert.c+2−2
@@ -319,7 +319,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) · 318 unmodified lines
319 319
320 if (ac->dc) {320 if (ac->dc) {
321 /* dithered conversion */321 /* dithered conversion */
322 av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n",322 av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n",
323 len, av_get_sample_fmt_name(ac->in_fmt),323 len, av_get_sample_fmt_name(ac->in_fmt),
324 av_get_sample_fmt_name(ac->out_fmt));324 av_get_sample_fmt_name(ac->out_fmt));
325 325
@@ -337,7 +337,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) · 11 unmodified lines
337 use_generic = 0;337 use_generic = 0;
338 }338 }
339 }339 }
340 av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (%s)\n", len,340 av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\n", len,
341 av_get_sample_fmt_name(ac->in_fmt),341 av_get_sample_fmt_name(ac->in_fmt),
342 av_get_sample_fmt_name(ac->out_fmt),342 av_get_sample_fmt_name(ac->out_fmt),
343 use_generic ? ac->func_descr_generic : ac->func_descr);343 use_generic ? ac->func_descr_generic : ac->func_descr);
libavresample/audio_mix.c+1−1
@@ -441,7 +441,7 @@ int ff_audio_mix(AudioMix *am, AudioData *src) · 440 unmodified lines
441 use_generic = 0;441 use_generic = 0;
442 }442 }
443 }443 }
444 av_dlog(am->avr, "audio_mix: %d samples - %d to %d channels (%s)\n",444 av_log(am->avr, AV_LOG_TRACE, "audio_mix: %d samples - %d to %d channels (%s)\n",
445 src->nb_samples, am->in_channels, am->out_channels,445 src->nb_samples, am->in_channels, am->out_channels,
446 use_generic ? am->func_descr_generic : am->func_descr);446 use_generic ? am->func_descr_generic : am->func_descr);
447 447
libavresample/resample.c+1−1
@@ -485,7 +485,7 @@ int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src) · 484 unmodified lines
485 ff_audio_data_drain(c->buffer, consumed);485 ff_audio_data_drain(c->buffer, consumed);
486 c->initial_padding_samples = FFMAX(c->initial_padding_samples - consumed, 0);486 c->initial_padding_samples = FFMAX(c->initial_padding_samples - consumed, 0);
487 487
488 av_dlog(c->avr, "resampled %d in + %d leftover to %d out + %d leftover\n",488 av_log(c->avr, AV_LOG_TRACE, "resampled %d in + %d leftover to %d out + %d leftover\n",
489 in_samples, in_leftover, out_samples, c->buffer->nb_samples);489 in_samples, in_leftover, out_samples, c->buffer->nb_samples);
490 490
491 dst->nb_samples = out_samples;491 dst->nb_samples = out_samples;
libavresample/utils.c+38−38
@@ -127,46 +127,46 @@ int avresample_open(AVAudioResampleContext *avr) · 126 unmodified lines
127 if (avr->use_channel_map) {127 if (avr->use_channel_map) {
128 if (avr->in_copy_needed) {128 if (avr->in_copy_needed) {
129 avr->remap_point = REMAP_IN_COPY;129 avr->remap_point = REMAP_IN_COPY;
130 av_dlog(avr, "remap channels during in_copy\n");130 av_log(avr, AV_LOG_TRACE, "remap channels during in_copy\n");
131 } else if (avr->in_convert_needed) {131 } else if (avr->in_convert_needed) {
132 avr->remap_point = REMAP_IN_CONVERT;132 avr->remap_point = REMAP_IN_CONVERT;
133 av_dlog(avr, "remap channels during in_convert\n");133 av_log(avr, AV_LOG_TRACE, "remap channels during in_convert\n");
134 } else if (avr->out_convert_needed) {134 } else if (avr->out_convert_needed) {
135 avr->remap_point = REMAP_OUT_CONVERT;135 avr->remap_point = REMAP_OUT_CONVERT;
136 av_dlog(avr, "remap channels during out_convert\n");136 av_log(avr, AV_LOG_TRACE, "remap channels during out_convert\n");
137 } else {137 } else {
138 avr->remap_point = REMAP_OUT_COPY;138 avr->remap_point = REMAP_OUT_COPY;
139 av_dlog(avr, "remap channels during out_copy\n");139 av_log(avr, AV_LOG_TRACE, "remap channels during out_copy\n");
140 }140 }
141 141
142#ifdef DEBUG142#ifdef DEBUG
143 {143 {
144 int ch;144 int ch;
145 av_dlog(avr, "output map: ");145 av_log(avr, AV_LOG_TRACE, "output map: ");
146 if (avr->ch_map_info.do_remap)146 if (avr->ch_map_info.do_remap)
147 for (ch = 0; ch < avr->in_channels; ch++)147 for (ch = 0; ch < avr->in_channels; ch++)
148 av_dlog(avr, " % 2d", avr->ch_map_info.channel_map[ch]);148 av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_map[ch]);
149 else149 else
150 av_dlog(avr, "n/a");150 av_log(avr, AV_LOG_TRACE, "n/a");
151 av_dlog(avr, "\n");151 av_log(avr, AV_LOG_TRACE, "\n");
152 av_dlog(avr, "copy map: ");152 av_log(avr, AV_LOG_TRACE, "copy map: ");
153 if (avr->ch_map_info.do_copy)153 if (avr->ch_map_info.do_copy)
154 for (ch = 0; ch < avr->in_channels; ch++)154 for (ch = 0; ch < avr->in_channels; ch++)
155 av_dlog(avr, " % 2d", avr->ch_map_info.channel_copy[ch]);155 av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_copy[ch]);
156 else156 else
157 av_dlog(avr, "n/a");157 av_log(avr, AV_LOG_TRACE, "n/a");
158 av_dlog(avr, "\n");158 av_log(avr, AV_LOG_TRACE, "\n");
159 av_dlog(avr, "zero map: ");159 av_log(avr, AV_LOG_TRACE, "zero map: ");
160 if (avr->ch_map_info.do_zero)160 if (avr->ch_map_info.do_zero)
161 for (ch = 0; ch < avr->in_channels; ch++)161 for (ch = 0; ch < avr->in_channels; ch++)
162 av_dlog(avr, " % 2d", avr->ch_map_info.channel_zero[ch]);162 av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_zero[ch]);
163 else163 else
164 av_dlog(avr, "n/a");164 av_log(avr, AV_LOG_TRACE, "n/a");
165 av_dlog(avr, "\n");165 av_log(avr, AV_LOG_TRACE, "\n");
166 av_dlog(avr, "input map: ");166 av_log(avr, AV_LOG_TRACE, "input map: ");
167 for (ch = 0; ch < avr->in_channels; ch++)167 for (ch = 0; ch < avr->in_channels; ch++)
168 av_dlog(avr, " % 2d", avr->ch_map_info.input_map[ch]);168 av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.input_map[ch]);
169 av_dlog(avr, "\n");169 av_log(avr, AV_LOG_TRACE, "\n");
170 }170 }
171#endif171#endif
172 } else172 } else
@@ -295,7 +295,7 @@ static int handle_buffered_output(AVAudioResampleContext *avr, · 122 unmodified lines
295 /* if there are any samples in the output FIFO or if the295 /* if there are any samples in the output FIFO or if the
296 user-supplied output buffer is not large enough for all samples,296 user-supplied output buffer is not large enough for all samples,
297 we add to the output FIFO */297 we add to the output FIFO */
298 av_dlog(avr, "[FIFO] add %s to out_fifo\n", converted->name);298 av_log(avr, AV_LOG_TRACE, "[FIFO] add %s to out_fifo\n", converted->name);
299 ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0,299 ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0,
300 converted->nb_samples);300 converted->nb_samples);
301 if (ret < 0)301 if (ret < 0)
@@ -305,25 +305,25 @@ static int handle_buffered_output(AVAudioResampleContext *avr, · 3 unmodified lines
305 /* if the user specified an output buffer, read samples from the output305 /* if the user specified an output buffer, read samples from the output
306 FIFO to the user output */306 FIFO to the user output */
307 if (output && output->allocated_samples > 0) {307 if (output && output->allocated_samples > 0) {
308 av_dlog(avr, "[FIFO] read from out_fifo to output\n");308 av_log(avr, AV_LOG_TRACE, "[FIFO] read from out_fifo to output\n");
309 av_dlog(avr, "[end conversion]\n");309 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
310 return ff_audio_data_read_from_fifo(avr->out_fifo, output,310 return ff_audio_data_read_from_fifo(avr->out_fifo, output,
311 output->allocated_samples);311 output->allocated_samples);
312 }312 }
313 } else if (converted) {313 } else if (converted) {
314 /* copy directly to output if it is large enough or there is not any314 /* copy directly to output if it is large enough or there is not any
315 data in the output FIFO */315 data in the output FIFO */
316 av_dlog(avr, "[copy] %s to output\n", converted->name);316 av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", converted->name);
317 output->nb_samples = 0;317 output->nb_samples = 0;
318 ret = ff_audio_data_copy(output, converted,318 ret = ff_audio_data_copy(output, converted,
319 avr->remap_point == REMAP_OUT_COPY ?319 avr->remap_point == REMAP_OUT_COPY ?
320 &avr->ch_map_info : NULL);320 &avr->ch_map_info : NULL);
321 if (ret < 0)321 if (ret < 0)
322 return ret;322 return ret;
323 av_dlog(avr, "[end conversion]\n");323 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
324 return output->nb_samples;324 return output->nb_samples;
325 }325 }
326 av_dlog(avr, "[end conversion]\n");326 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
327 return 0;327 return 0;
328}328}
329 329
@@ -354,7 +354,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 24 unmodified lines
354 avr->out_buffer->allocated_channels);354 avr->out_buffer->allocated_channels);
355 }355 }
356 356
357 av_dlog(avr, "[start conversion]\n");357 av_log(avr, AV_LOG_TRACE, "[start conversion]\n");
358 358
359 /* initialize output_buffer with output data */359 /* initialize output_buffer with output data */
360 direct_output = output && av_audio_fifo_size(avr->out_fifo) == 0;360 direct_output = output && av_audio_fifo_size(avr->out_fifo) == 0;
@@ -380,7 +380,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 19 unmodified lines
380 !avr->out_convert_needed && direct_output && out_samples >= in_samples) {380 !avr->out_convert_needed && direct_output && out_samples >= in_samples) {
381 /* in some rare cases we can copy input to output and upmix381 /* in some rare cases we can copy input to output and upmix
382 directly in the output buffer */382 directly in the output buffer */
383 av_dlog(avr, "[copy] %s to output\n", current_buffer->name);383 av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", current_buffer->name);
384 ret = ff_audio_data_copy(&output_buffer, current_buffer,384 ret = ff_audio_data_copy(&output_buffer, current_buffer,
385 avr->remap_point == REMAP_OUT_COPY ?385 avr->remap_point == REMAP_OUT_COPY ?
386 &avr->ch_map_info : NULL);386 &avr->ch_map_info : NULL);
@@ -392,7 +392,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 5 unmodified lines
392 /* if remapping channels during output copy, we may need to392 /* if remapping channels during output copy, we may need to
393 * use an intermediate buffer in order to remap before adding393 * use an intermediate buffer in order to remap before adding
394 * samples to the output fifo */394 * samples to the output fifo */
395 av_dlog(avr, "[copy] %s to out_buffer\n", current_buffer->name);395 av_log(avr, AV_LOG_TRACE, "[copy] %s to out_buffer\n", current_buffer->name);
396 ret = ff_audio_data_copy(avr->out_buffer, current_buffer,396 ret = ff_audio_data_copy(avr->out_buffer, current_buffer,
397 &avr->ch_map_info);397 &avr->ch_map_info);
398 if (ret < 0)398 if (ret < 0)
@@ -406,13 +406,13 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 7 unmodified lines
406 current_buffer->nb_samples);406 current_buffer->nb_samples);
407 if (ret < 0)407 if (ret < 0)
408 return ret;408 return ret;
409 av_dlog(avr, "[convert] %s to in_buffer\n", current_buffer->name);409 av_log(avr, AV_LOG_TRACE, "[convert] %s to in_buffer\n", current_buffer->name);
410 ret = ff_audio_convert(avr->ac_in, avr->in_buffer,410 ret = ff_audio_convert(avr->ac_in, avr->in_buffer,
411 current_buffer);411 current_buffer);
412 if (ret < 0)412 if (ret < 0)
413 return ret;413 return ret;
414 } else {414 } else {
415 av_dlog(avr, "[copy] %s to in_buffer\n", current_buffer->name);415 av_log(avr, AV_LOG_TRACE, "[copy] %s to in_buffer\n", current_buffer->name);
416 ret = ff_audio_data_copy(avr->in_buffer, current_buffer,416 ret = ff_audio_data_copy(avr->in_buffer, current_buffer,
417 avr->remap_point == REMAP_IN_COPY ?417 avr->remap_point == REMAP_IN_COPY ?
418 &avr->ch_map_info : NULL);418 &avr->ch_map_info : NULL);
@@ -421,7 +421,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 2 unmodified lines
421 }421 }
422 ff_audio_data_set_channels(avr->in_buffer, avr->in_channels);422 ff_audio_data_set_channels(avr->in_buffer, avr->in_channels);
423 if (avr->downmix_needed) {423 if (avr->downmix_needed) {
424 av_dlog(avr, "[downmix] in_buffer\n");424 av_log(avr, AV_LOG_TRACE, "[downmix] in_buffer\n");
425 ret = ff_audio_mix(avr->am, avr->in_buffer);425 ret = ff_audio_mix(avr->am, avr->in_buffer);
426 if (ret < 0)426 if (ret < 0)
427 return ret;427 return ret;
@@ -443,7 +443,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 15 unmodified lines
443 resample_out = &output_buffer;443 resample_out = &output_buffer;
444 else444 else
445 resample_out = avr->resample_out_buffer;445 resample_out = avr->resample_out_buffer;
446 av_dlog(avr, "[resample] %s to %s\n",446 av_log(avr, AV_LOG_TRACE, "[resample] %s to %s\n",
447 current_buffer ? current_buffer->name : "null",447 current_buffer ? current_buffer->name : "null",
448 resample_out->name);448 resample_out->name);
449 ret = ff_audio_resample(avr->resample, resample_out,449 ret = ff_audio_resample(avr->resample, resample_out,
@@ -453,7 +453,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 3 unmodified lines
453 453
454 /* if resampling did not produce any samples, just return 0 */454 /* if resampling did not produce any samples, just return 0 */
455 if (resample_out->nb_samples == 0) {455 if (resample_out->nb_samples == 0) {
456 av_dlog(avr, "[end conversion]\n");456 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
457 return 0;457 return 0;
458 }458 }
459 459
@@ -461,7 +461,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 1 unmodified line
461 }461 }
462 462
463 if (avr->upmix_needed) {463 if (avr->upmix_needed) {
464 av_dlog(avr, "[upmix] %s\n", current_buffer->name);464 av_log(avr, AV_LOG_TRACE, "[upmix] %s\n", current_buffer->name);
465 ret = ff_audio_mix(avr->am, current_buffer);465 ret = ff_audio_mix(avr->am, current_buffer);
466 if (ret < 0)466 if (ret < 0)
467 return ret;467 return ret;
@@ -469,26 +469,26 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, · 1 unmodified line
469 469
470 /* if we resampled or upmixed directly to output, return here */470 /* if we resampled or upmixed directly to output, return here */
471 if (current_buffer == &output_buffer) {471 if (current_buffer == &output_buffer) {
472 av_dlog(avr, "[end conversion]\n");472 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
473 return current_buffer->nb_samples;473 return current_buffer->nb_samples;
474 }474 }
475 475
476 if (avr->out_convert_needed) {476 if (avr->out_convert_needed) {
477 if (direct_output && out_samples >= current_buffer->nb_samples) {477 if (direct_output && out_samples >= current_buffer->nb_samples) {
478 /* convert directly to output */478 /* convert directly to output */
479 av_dlog(avr, "[convert] %s to output\n", current_buffer->name);479 av_log(avr, AV_LOG_TRACE, "[convert] %s to output\n", current_buffer->name);
480 ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer);480 ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer);
481 if (ret < 0)481 if (ret < 0)
482 return ret;482 return ret;
483 483
484 av_dlog(avr, "[end conversion]\n");484 av_log(avr, AV_LOG_TRACE, "[end conversion]\n");
485 return output_buffer.nb_samples;485 return output_buffer.nb_samples;
486 } else {486 } else {
487 ret = ff_audio_data_realloc(avr->out_buffer,487 ret = ff_audio_data_realloc(avr->out_buffer,
488 current_buffer->nb_samples);488 current_buffer->nb_samples);
489 if (ret < 0)489 if (ret < 0)
490 return ret;490 return ret;
491 av_dlog(avr, "[convert] %s to out_buffer\n", current_buffer->name);491 av_log(avr, AV_LOG_TRACE, "[convert] %s to out_buffer\n", current_buffer->name);
492 ret = ff_audio_convert(avr->ac_out, avr->out_buffer,492 ret = ff_audio_convert(avr->ac_out, avr->out_buffer,
493 current_buffer);493 current_buffer);
494 if (ret < 0)494 if (ret < 0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t