| 1148 | | if (pkt->size < 5 || AV_RB32(pkt->data) != 0x0000001) { |
| 1149 | | if (!st->nb_frames) { |
| 1150 | | av_log(s, AV_LOG_ERROR, "H.264 bitstream malformed, " |
| 1151 | | "no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)\n"); |
| 1152 | | return AVERROR(EINVAL); |
| 1153 | | } |
| 1154 | | av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing\n"); |
| | 1148 | if ((pkt->size > 4 && AV_RB32(pkt->data) == 0x00000001) || (pkt->size >= 4 && AV_RB24(pkt->data) == 0x000001)) |
| | 1149 | return 0; |
| | 1150 | |
| | 1151 | if (!st->nb_frames) { |
| | 1152 | av_log(s, AV_LOG_ERROR, "H.264 bitstream malformed, " |
| | 1153 | "no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)\n"); |
| | 1154 | return AVERROR(EINVAL); |