diff --git a/libav/avformat.h b/libav/avformat.h index 3b20a2d335332495560111d8f98481c037ec99b7..c982336f42828fde716cccf024f8e82b322af424 100644 --- a/libav/avformat.h +++ b/libav/avformat.h @@ -76,6 +76,7 @@ typedef struct AVFormat { typedef struct AVStream { int id; /* internal stream id */ AVCodecContext codec; /* codec context */ + int r_frame_rate; /* real frame rate of the stream */ void *priv_data; } AVStream; diff --git a/libav/mpeg.c b/libav/mpeg.c index 91136e6091963be4ef8dc32364ff2f8f2e1fdd45..6443b18bb39fac1ae700a14bb72444e020ec942f 100644 --- a/libav/mpeg.c +++ b/libav/mpeg.c @@ -376,6 +376,10 @@ static int mpeg_mux_write_packet(AVFormatContext *ctx, int stream_index, } stream->pts += ticker_tick(&stream->pts_ticker, 1); + //if (st->codec.codec_type == CODEC_TYPE_VIDEO) + // fprintf(stderr,"\nVideo PTS: %6lld", stream->pts); + //else + // fprintf(stderr,"\nAudio PTS: %6lld", stream->pts); return 0; }