comparison utils.c @ 1244:1a14fff172ca libavformat

timestamp debugging av_logs()
author michael
date Tue, 08 Aug 2006 19:55:32 +0000
parents 13dc486b272b
children e59b75051ded
comparison
equal deleted inserted replaced
1243:088e77e1d06f 1244:1a14fff172ca
869 /* no parsing needed: we just output the packet as is */ 869 /* no parsing needed: we just output the packet as is */
870 /* raw data support */ 870 /* raw data support */
871 *pkt = s->cur_pkt; 871 *pkt = s->cur_pkt;
872 compute_pkt_fields(s, st, NULL, pkt); 872 compute_pkt_fields(s, st, NULL, pkt);
873 s->cur_st = NULL; 873 s->cur_st = NULL;
874 return 0; 874 break;
875 } else if (s->cur_len > 0 && st->discard < AVDISCARD_ALL) { 875 } else if (s->cur_len > 0 && st->discard < AVDISCARD_ALL) {
876 len = av_parser_parse(st->parser, st->codec, &pkt->data, &pkt->size, 876 len = av_parser_parse(st->parser, st->codec, &pkt->data, &pkt->size,
877 s->cur_ptr, s->cur_len, 877 s->cur_ptr, s->cur_len,
878 s->cur_pkt.pts, s->cur_pkt.dts); 878 s->cur_pkt.pts, s->cur_pkt.dts);
879 s->cur_pkt.pts = AV_NOPTS_VALUE; 879 s->cur_pkt.pts = AV_NOPTS_VALUE;
889 pkt->stream_index = st->index; 889 pkt->stream_index = st->index;
890 pkt->pts = st->parser->pts; 890 pkt->pts = st->parser->pts;
891 pkt->dts = st->parser->dts; 891 pkt->dts = st->parser->dts;
892 pkt->destruct = av_destruct_packet_nofree; 892 pkt->destruct = av_destruct_packet_nofree;
893 compute_pkt_fields(s, st, st->parser, pkt); 893 compute_pkt_fields(s, st, st->parser, pkt);
894 return 0; 894 break;
895 } 895 }
896 } else { 896 } else {
897 /* free packet */ 897 /* free packet */
898 av_free_packet(&s->cur_pkt); 898 av_free_packet(&s->cur_pkt);
899 s->cur_st = NULL; 899 s->cur_st = NULL;
919 /* no more packets: really terminates parsing */ 919 /* no more packets: really terminates parsing */
920 return ret; 920 return ret;
921 } 921 }
922 922
923 st = s->streams[s->cur_pkt.stream_index]; 923 st = s->streams[s->cur_pkt.stream_index];
924 if(st->codec->debug & FF_DEBUG_PTS)
925 av_log(s, AV_LOG_DEBUG, "av_read_packet stream=%d, pts=%lld, dts=%lld, size=%d\n",
926 s->cur_pkt.stream_index,
927 s->cur_pkt.pts,
928 s->cur_pkt.dts,
929 s->cur_pkt.size);
924 930
925 s->cur_st = st; 931 s->cur_st = st;
926 s->cur_ptr = s->cur_pkt.data; 932 s->cur_ptr = s->cur_pkt.data;
927 s->cur_len = s->cur_pkt.size; 933 s->cur_len = s->cur_pkt.size;
928 if (st->need_parsing && !st->parser) { 934 if (st->need_parsing && !st->parser) {
934 st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES; 940 st->parser->flags |= PARSER_FLAG_COMPLETE_FRAMES;
935 } 941 }
936 } 942 }
937 } 943 }
938 } 944 }
945 if(st->codec->debug & FF_DEBUG_PTS)
946 av_log(s, AV_LOG_DEBUG, "av_read_frame_internal stream=%d, pts=%lld, dts=%lld, size=%d\n",
947 pkt->stream_index,
948 pkt->pts,
949 pkt->dts,
950 pkt->size);
951
952 return 0;
939 } 953 }
940 954
941 /** 955 /**
942 * Return the next frame of a stream. 956 * Return the next frame of a stream.
943 * 957 *