| 620 | } |
| 621 | |
| 622 | int ff_side_data_set_prft(AVPacket *pkt, int64_t timestamp) |
| 623 | { |
| 624 | AVProducerReferenceTime *prft; |
| 625 | uint8_t *side_data; |
| 626 | size_t side_data_size; |
| 627 | |
| 628 | side_data = av_packet_get_side_data(pkt, AV_PKT_DATA_PRFT, &side_data_size); |
| 629 | if (!side_data) { |
| 630 | side_data_size = sizeof(AVProducerReferenceTime); |
| 631 | side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_PRFT, side_data_size); |
| 632 | } |
| 633 | |
| 634 | if (!side_data || side_data_size < sizeof(AVProducerReferenceTime)) |
| 635 | return AVERROR(ENOMEM); |
| 636 | |
| 637 | prft = (AVProducerReferenceTime *)side_data; |
| 638 | prft->wallclock = timestamp; |
| 639 | prft->flags = 0; |
| 640 | |
| 641 | return 0; |
| 642 | } |
| 643 | |
| 644 | const AVPacketSideData *av_packet_side_data_get(const AVPacketSideData *sd, int nb_sd, |
| 645 | enum AVPacketSideDataType type) |
no test coverage detected