- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjmedia/src/pjmedia-codec/ffmpeg_vid_codecs.c
r5198 r5513 1430 1430 PJ_ASSERT_RETURN(ff->enc_ctx, PJ_EINVALIDOP); 1431 1431 1432 #ifdef PJMEDIA_USE_OLD_FFMPEG 1433 avcodec_get_frame_defaults(&avframe); 1434 #else 1432 1435 pj_bzero(&avframe, sizeof(avframe)); 1433 1436 av_frame_unref(&avframe); 1437 #endif 1434 1438 1435 1439 // Let ffmpeg manage the timestamps … … 1473 1477 return PJMEDIA_CODEC_EFAILED; 1474 1478 } else { 1479 pj_bool_t has_key_frame = PJ_FALSE; 1475 1480 output->size = err; 1476 1481 output->bit_info = 0; 1477 if (ff->enc_ctx->coded_frame->key_frame) 1478 output->bit_info |= PJMEDIA_VID_FRM_KEYFRAME; 1482 1483 #if LIBAVCODEC_VER_AT_LEAST(54,15) 1484 has_key_frame = (avpacket.flags & AV_PKT_FLAG_KEY); 1485 #else 1486 has_key_frame = ff->enc_ctx->coded_frame->key_frame; 1487 #endif 1488 if (has_key_frame) 1489 output->bit_info |= PJMEDIA_VID_FRM_KEYFRAME; 1479 1490 } 1480 1491 … … 1681 1692 * closed). 1682 1693 */ 1694 #ifdef PJMEDIA_USE_OLD_FFMPEG 1695 avcodec_get_frame_defaults(&avframe); 1696 #else 1683 1697 pj_bzero(&avframe, sizeof(avframe)); 1684 1698 av_frame_unref(&avframe); 1699 #endif 1685 1700 1686 1701 /* Init packet, the container of the encoded data */
Note: See TracChangeset
for help on using the changeset viewer.