| 718 | } |
| 719 | |
| 720 | static int filter_packet(AVFormatContext *avf, ConcatStream *cs, AVPacket *pkt) |
| 721 | { |
| 722 | int ret; |
| 723 | |
| 724 | if (cs->bsf) { |
| 725 | ret = av_bsf_send_packet(cs->bsf, pkt); |
| 726 | if (ret < 0) { |
| 727 | av_log(avf, AV_LOG_ERROR, "h264_mp4toannexb filter " |
| 728 | "failed to send input packet\n"); |
| 729 | return ret; |
| 730 | } |
| 731 | |
| 732 | while (!ret) |
| 733 | ret = av_bsf_receive_packet(cs->bsf, pkt); |
| 734 | |
| 735 | if (ret < 0 && (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF)) { |
| 736 | av_log(avf, AV_LOG_ERROR, "h264_mp4toannexb filter " |
| 737 | "failed to receive output packet\n"); |
| 738 | return ret; |
| 739 | } |
| 740 | } |
| 741 | return 0; |
| 742 | } |
| 743 | |
| 744 | /* Returns true if the packet dts is greater or equal to the specified outpoint. */ |
| 745 | static int packet_after_outpoint(ConcatContext *cat, AVPacket *pkt) |
no test coverage detected