Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (av_read_frame (context, &packet) >=0)
- {
- if(packet.stream_index == videoStreamIndex ) {
- avcodec_decode_video2 (pCodecCtx, pFrame, &finished, &packet);
- AVRational fr = av_guess_frame_rate(context, video_stream, pFrame);
- LOGD(" Frame RAte = %d/%d ", fr.num, fr.den);
- if ( finished) {
- double pts;
- pts = av_q2d(pCodecCtx->time_base) * pFrame->pts;
- LOGD (" Received Frame of type %c pts is %ld pts %f " , av_get_picture_type_char(pFrame->pict_type), pFrame->pts);
- } // Received Complete Frame..
- } // Video Stream Index.
- //av_free_packet (&packet);
- } // While
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement